Closed Maprunner closed 9 years ago
I have added a .user.ini file to the sub-domain containing: memory_limit = 128M upload_max_filesize = 10M post_max_size = 10M and it fixes it for that sub-domain. I tried placing that file in the top folder and above web root and it had no effect. I'll ask the hosting company for advice on how to fix it for all.
It seems strange that it only affected some big events.
Just done a check through recent log files. Memory errors still showing up, as listed below. For now I have increased the memory limit in .user.ini to 256M (!!!), but I may need to optimise some of the processing to use less memory.
[19-Aug-2014 15:31:28 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 72 bytes) in /home/rgadget/public_html/tvoc/rg2/rg2api.php on line 1576
[07-Sep-2014 20:15:35 Europe/London] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 72 bytes) in /home/rgadget/public_html/tvoc/rg2/rg2api.php on line 1576
[03-Aug-2014 21:58:46 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 786389 bytes) in /home/rgadget/public_html/swoc/rg2/rg2api.php on line 1622
[06-Aug-2014 09:03:08 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 786389 bytes) in /home/rgadget/public_html/swoc/rg2/rg2api.php on line 1622
[17-Aug-2014 07:07:51 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 786389 bytes) in /home/rgadget/public_html/swoc/rg2/rg2api.php on line 1622
[19-Aug-2014 07:55:57 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 786389 bytes) in /home/rgadget/public_html/swoc/rg2/rg2api.php on line 1622
[20-Aug-2014 09:27:24 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 786389 bytes) in /home/rgadget/public_html/swoc/rg2/rg2api.php on line 1622
[21-Aug-2014 10:46:53 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 786389 bytes) in /home/rgadget/public_html/swoc/rg2/rg2api.php on line 1622
[21-Aug-2014 10:49:38 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 786389 bytes) in /home/rgadget/public_html/swoc/rg2/rg2api.php on line 1622
[21-Aug-2014 10:54:15 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 786389 bytes) in /home/rgadget/public_html/swoc/rg2/rg2api.php on line 1622
[21-Aug-2014 10:54:28 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 786389 bytes) in /home/rgadget/public_html/swoc/rg2/rg2api.php on line 1622
[21-Aug-2014 10:57:32 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 786389 bytes) in /home/rgadget/public_html/swoc/rg2/rg2api.php on line 1622
[21-Aug-2014 10:57:41 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 786389 bytes) in /home/rgadget/public_html/swoc/rg2/rg2api.php on line 1622
[21-Aug-2014 11:48:44 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 786389 bytes) in /home/rgadget/public_html/swoc/rg2/rg2api.php on line 1622
[21-Aug-2014 14:27:27 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 786389 bytes) in /home/rgadget/public_html/swoc/rg2/rg2api.php on line 1622
[14-Sep-2014 13:05:49 Europe/London] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 786389 bytes) in /home/rgadget/public_html/swoc/rg2/rg2api.php on line 1622
[17-Sep-2014 23:05:35 Europe/London] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 786389 bytes) in /home/rgadget/public_html/swoc/rg2/rg2api.php on line 1622
[22-Sep-2014 12:48:11 Europe/London] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 786389 bytes) in /home/rgadget/public_html/swoc/rg2/rg2api.php on line 1622
Also seen for BKO, S6Day, JK, BAOC, SYO.
Had a longer look at this. The main problem seems to be json_encode for long integer arrays (x and y positions). I managed to reduce memory by over half by changing to a comma separated string. Also avoid reading results file into memory when creating stats, which might mean the NSW stats will work.
Haven't seen this problem for a few months on the routegadget.co.uk site. Looks like the previous change has sorted it. Close for now.
If you try to load a "big" event you may get: "Configuration error: Results request failed for event 184: Syntax error: Invalid character"
This was caused by a PHP memory limit, probably introduced when routegadget.co.uk moved to a new server. It can be fixed for individual installations by adding "memory_limit = 128M" (or whatever size is needed: trrial and error!) to php.ini in the rg2 directory. Need to try to fix this at server level for routegadget.co.uk.