Test runner sometimes just stops, sometimes gives "Allowed memory size exhausted" error
Since my latest run (~2 weeks ago), the Codeception runner is suddenly hanging strangely:
-
Sometimes, in the middle of the suite, it just stops with message "COMMAND DID NOT FINISH PROPERLY."
-
Sometimes (at another test), it crashes with:
PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in ...vendor/symfony/var-dumper/Caster/ClassStub.php on line 52
However, the
memory_limitin myphp.inis (for CLI and FPM) is3000M. So where is the 1G limit coming from?
This is not caused by the tests themselves, cause when I run just the affected files alone, everything's fine.
Any ideas? Is somebody else experiencing this? Were there recent changes regarding memory management (couldn't find anything)?
PHP 8.3.19
I have the same problem after upgrading to version 5.2.1
FATAL ERROR. TESTS NOT FINISHED. Allowed memory size of 1073741824 bytes exhausted (tried to allocate 1003520 bytes) An Error occurred while handling another error: Headers already sent in /var/www/vendor/codeception/codeception/src/Codeception/Subscriber/ErrorHandler.php on line 175
Memory consumed(same tests):
Codeception v5.1.2 - 770.34 MB Codeception v5.2.1 - 1.30 GB Codeception v5.3.0 - 1.27 GB
If you provide a sample application where this behavior can be replicated I could go commit by commit backwards and find out what change causes it.
In 5.2.0 and 5.2.1 a lot of changes were integrated.