Custom Query (311 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (1 - 3 of 311)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#333 fixed Memory usage keeps growing while repeatedly require() the same empty file moo xubin04
Description

Hi, mOo, thanks for your great work and insistency during the past several years on Xcache, We've been using Xcache since its early versions, after upgrading Xcache from 1.3.2 to 3.0.4 recently, we met with a possible memory management issue in Xcache.

Code:

a.php

<?php
      for ($i=0; $i<10000; $i++) {
            require('b.php');
            printf('%d\n",  memory_get_usage());
      }

b.php

<?php
// this could be an empty file

Then, we run a.php with the following command:

php -d xcache.test=on a.test

(I set xcache.test=on since Xcache doesn't enable cache under CLI mode by default)

and then the memory usage keeps growing:

224184
224512
224808
225104
225400
225696
225992
226288
226584
226880
227176
227472
227768
228064
...............

I agree it's far from PHP's best practices to include a file repeatedly, however, can we avoid extra memory allocation in such circumstances? The allocation seems to be reside in xc_cacher.c:

2147     /* found entry */
2148     if (stored_entry && stored_php) {
2149         zend_llist_add_element(&CG(open_files), h);
2150         return xc_compile_restore(stored_entry, stored_php TSRMLS_CC);
2151     }

Is this a bug or something 'have to be so' ? Is there an approaches we can bypass this issue if the application code is beyond our control?

Regards!

This is my PHP version info:

PHP 5.4.21 (cli) (built: Dec  6 2013 19:30:14)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with XCache v3.0.4, Copyright (c) 2005-2013, by mOo
    with XCache Cacher v3.0.4, Copyright (c) 2005-2013, by mOo
#244 duplicate Memory consumption issue with Xcache. moo Xtreme2damax
Description

I've been having an issue on my VPS where the available memory is consumed/drained fairly quickly. I've watched 50 MB - 100 MB of memory be consumed in a matter of minutes.

Today it was brought to my attention that Xcache might have been responsible for the continuous and rapid memory usage. I decided to uninstall Xcache earlier today and sure enough it was responsible for the rapid memory consumption. After uninstalling Xcache and restarting my web server, memory consumption returned to normal sane levels.

I run a Cpanel WHM vps with 512 MB of ram. I'm not sure if the issue was caused by a memory leak in Xcache or if I had Xcache configured incorrectly.

#178 fixed mmap crashing php moo xsawyerx@…
Description

When using xcache, if the kernel does not support enough size for xcache to use (mmap) and php defines it should indeed use that certain amount of size which is insufficient, it will cause a segmentation fault when PHP binary starts.

Also, there's a spelling error on mmap.c (line 209) in which it says "mappping" instead of "mapping" :)

1 2 3 4 5 6 7 8 9 10 11
Note: See TracQuery for help on using queries.