3 ms·
"Your first course of action is to increase your memory limit" - No. First thing you do is baseline your server and figure out how much max memory you want to a
by lazyant 12y ago
"Your first course of action is to increase your memory limit" - No. First thing you do is baseline your server and figure out how much max memory you want to allocate to PHP given the maximum that can be used from the other processes. OP's advice is a recipe for oom'ing your VPS. Also if there are more developers, hiding the memory allocation in code instead of setting file is going to be fun.
- 2upmedia 12y agoI mention: "never do these tests on a production server unless you’re sure you have plenty of RAM and you fully understand how web server processes consume memory. You could easily bring a server to its knees if there are many concurrent processes running, each using a high amount of memory." It's a temporary debugging procedure. The obvious goal to reduce memory usage. Later on I say: "If by increasing the memory limit you have gotten rid of the error and your code now works, you’ll need to take measures to decrease that memory usage. Here are a few things you could do to decrease it:"