I was going through the Apache config turning off access.log on #32 when I noticed a considerable error.log file. It is entirely filled with PHP memory limit errors. I upped the memory_limit config in php.ini from 256M to 384M in response.
My question is, is that setting there because the tests *should* fail for exceeding 256, or was it just a convenient setting for allowing simpletest to do it's work so then 384 is ok as a new limit?
Sample errors:
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 24 bytes) in /home/davidn/web/public/sites/default/files/checkout/includes/registry.inc on line 170
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes) in /home/davidn/web/public/sites/default/files/checkout/includes/registry.inc on line 170
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 24 bytes) in /home/davidn/web/public/sites/default/files/checkout/includes/registry.inc on line 170
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes) in /home/davidn/web/public/sites/default/files/checkout/includes/registry.inc on line 170
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1 bytes) in /home/davidn/web/public/sites/default/files/checkout/includes/database/database.inc on line 1711
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 534484_increase_memory_recommendation.patch | 1.17 KB | deekayen |
Comments
Comment #1
boombatower commentedThe latter...so apparently we have a higher memory requirement. Possibly something that should be looked into...hmm.
Comment #2
deekayen commentedJust to update, before I deleted #34's VPS, I tried it for a while on 285M and that still wasn't enough. #32 seems to be happy with 384M.
Turning this into a task to increase the PIFR's self test recommended setting from 256M to 384M.
Comment #3
deekayen commentedComment #4
boombatower commentedAlso need to up SimpleTests hook_requirements().
Comment #5
deekayen commentedComment #6
c960657 commentedThe patch in #550124: Remove prepared statement caching decreases the memory usage during test runs considerably. I doubt it will even get above 100 MB.
Comment #7
boombatower commentedIs there an easy way to measure that for sure?
Comment #8
deekayen commentedI'll see if I can setup xdebug to tell me somehow.
Comment #9
deekayen commentedxdebug makes a new xdebug_peak_memory_usage() function available at runtime, so there's a way.
Maybe I can just put that at the bottom of index.php, have it insert the value in a file or db table, and return with the results. Let's see what happens.
Comment #10
deekayen commentedI'm testing locally, not through PIFR. Here's how I'm testing:
Create a table to store the memory numbers:
Insert this on the bottom of index.php:
Activate simpletest and run them all. It gets to the openid tests locally, then I get
Before then, the largest peak memory consumption value is 126.72238159 MB taking 95.77 seconds on my 2.4ghz Core duo, based on the result from:
Obviously, I'd have to try on a different, un-buggy computer to get the entire test, but that won't happen soon, which is why I put my methodology above. The above also doesn't tell which test is running to know which one is the biggest hog. Maybe there's something in the $GLOBAL environment that would help clue us in on that?
Comment #11
deekayen commentedSomething is taking more memory. I used to be able to run concurrency 4 with 1GB ram... now it's swapping up to another 1GB to disk. Fields in core? That's the biggest recent thing...
Comment #12
moshe weitzman commentedthe field and field ui tests are very ram hungry for some reason.
Comment #13
boombatower commentedPerhaps we can tweak them a bit.
Comment #14
c960657 commentedIt is my impression that the memory footprint during testing is now much smaller, possibly due to #496500: Remove global placeholder counter.
Comment #15
deekayen commentedNevermind. There seems to have been improvements since I filed this.