Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Memory Issues from Cronjob


#1

Hi,
I keep getting messages from the testrail cronjob about exhausting memory.
I first gave testrail 500 mb and then 1000mb and then 3000mb.
Each time I eventually run out of memory.

Below are the messages:
PHP Fatal error: Allowed memory size of 3145728000 bytes exhausted (tried to allocate 114360 bytes) in /var/www/html/testrail/sys/core/loader.php on line 240 PHP error: Allowed memory size of 3145728000 bytes exhausted (tried to allocate 114360 bytes) in /var/www/html/testrail/sys/core/loader.php at 240

PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 114360 bytes) in /var/www/html/testrail/sys/core/loader.php on line 240 PHP error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 114360 bytes) in /var/www/html/testrail/sys/core/loader.php at 240

PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 114360 bytes) in /var/www/html/testrail/sys/core/loader.php on line 240 PHP error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 114360 bytes) in /var/www/html/testrail/sys/core/loader.php at 240

Can you please provide some advice on what is going on?
Thanks,
Cynthia


#2

Hello Cynthia,

Thanks for your posting. This is likely caused by a (really really) large report the background task tries to generate. For the background task, we usually recommend using the memory limit of -1 (unlimited) which is also the default for command line configuration of PHP:

http://php.net/manual/en/ini.core.php#ini.memory-limit

I hope this helps!

Cheers,
Tobias