Page MenuHomePhabricator

Default memory limit should be increased
Closed, ResolvedPublic


Author: jaymac407

Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 181066 bytes) in /home/jay/public_html/phase3/includes/specials/SpecialAllmessages.php on line 208

Looks like the 20M or so isn't enough.

Version: 1.14.x
Severity: enhancement
OS: Linux
Platform: PC



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:18 PM
bzimport set Reference to bz16084.

jaymac407 wrote:

I think the default memory limit should be increased to something around 50-100 MB. What do you lot think?

mike.lifeguard+bugs wrote:

Hopefully a better summary

jaymac407 wrote:

proposed patch

I propose a 50M memory limit as a default. Patch included.


This still sucks horribly; it really should be done at run time, not at install time.

Reverting for now in r45475

The logic is wrong and will fail to raise the limit to the new limit if the server's default is between 20 and 50. Further, the whole logic is crappy; we should be doing the check at runtime rather than at install time, since the server's settings may change after we install.

  • Bug 19775 has been marked as a duplicate of this bug. ***

Adds a run-time check

Checks in Setup.php that the memory limit is at least 50M and raises it otherwise. The installer will still raise the memory limit for its own purposes but will not write anything to LocalSettings.php.

attachment check_memory_limit.patch ignored as obsolete

  • Bug 19663 has been marked as a duplicate of this bug. ***

Patch looks ok by me. I'll commit this evening.

Now with a global variable, $wgMemoryLimit, and a global function for parsing PHP's memory limits


overlordq wrote:

Fix the function to handle input better

Given patch will actually lower memory usage in cases where somebody uses the other shorthand forms.