On one fairly strong script (requires a lot of memory), the site began to throw an error:

Fatal error: Out of memory (allocated x) (tried to allocate n bytes) 

Delivered with a margin

 memory_limit = 256M 

But still the same mistake.

top gives out

 Mem: ... total, .... used, 53456k free, ... buffers 
  • 2
    Probably the script just flows. I advise you to use a profiler in such cases. - Ilya Pirogov
  • If you still really need a lot of memory, then make memory_limit=-1 - Alexander

1 answer 1

Try to write scripts so that they do not require 200MB of memory for work, because all this memory car accumulates in the process. Therefore, check your PHP script for memory leaks using the ingenious W3AF framework to test and check your script with lots of plug-ins ((about a hundred (!)) Including to check the script for leaks)