0

Both XCache and eAccelerator have a memory leak bug which will leak memory if you include the same file tens of times in a loop, even though the code executed in the file does not use up any memory at all at each execution. (the exact same script without eAccelerator or XCache does not leak memory)

I replaced XCache with eAccelerator and at first I was not observing the bug but then it appeared.

Does OPCache have this fixed or does it suffer from the same bug?

I use PHP 5.4.29 If so, can I install OPCache from PECL and will it be the same as the one that comes bundled with PHP 5.5+ (that is, without the memory leak), or do I have to upgrade to PHP 5.5 or higher?

matteo
  • 701
  • 2
  • 9
  • 21

1 Answers1

2

If you think eAccelerator and XCache leak badly, try using APC, which just plain crashes PHP entirely.

In the couple of years I've been using OPcache I've never seen a memory leak or crash.

That said, you should update PHP anyway, as 5.4 will be end of life in just a few days.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940