Custom Query (307 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (13 - 15 of 307)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
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
#331 duplicate Refcount of variables appears wrong moo AlexisWilke
Description

Hi guys,

I'm on Ubuntu with version 2.0.0 and could not see any ticket in regard to this bug. The Refcount in the admin screens shown for PHP snippets is correct. In most cases it is zero. However, for variables, it looks like something went wrong...

In most cases I see 4294967296 which is hexadecimal is 0x0000:0001:0000:0000, which looks like a 64 bits swapped value (i.e. if Refcount is expected to be 1 by default.)

The other number I see is similar to 140273040694784 -- that number varies -- which in hexadecimal seems to represent a memory address, this one is: 0x7F93DCC31E00.

I would hope it was fixed since version 2.0.0, but that's all that Ubuntu currently offers and since I did not see another report about this problem, I though I would create one anyway.

The cache seems to be working just fine otherwise.

#330 fixed Compilation failure windows xcache 3.0.3 moo weltling
Description

Well, the config.w32 is very complicated. All that rexeg magic over m4, so here's an error. Please consider the attached patch, multiple occurences of the XCACHE_INDENT need 'g' flag.

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