Fatal error: Allowed memory size exhausted


I know there are several threads on this already, but all are old and closed…

I’m getting Fatal error: Allowed memory size of 134217728 bytes exhausted… on ONE page only of my website. All other pages can be navigated normally.

This seems to have coincided with my website not having a working SSL certificate anymore. IE https is struck out on Chrome and it gets reported as a dangerous site. This may be another issue entirely…

I’ve tried adding php_value memory_limit 128M to .htaccess as suggested in another thread, but it didn’t help.

Please help.




Some users of my site reported being able to access the rogue page…

I tested by creating a new user (to my site) and logging in… I was able to access also.

I thought this may have been related to the webhost problems today, but apparently they are fixed. Any ideas what’s going on for me?


Hi @mrots!

The servers are configured to support 128MB at most per PHP session. Your script has passed that limit and it has been halted: 134MB > 128MB

Your only choice is to either code your website in another way or to buy a plan which supports more memory.

Maybe the overall limits have been temporarily exceeded. The fix to prevent this is to buy a dedicated paid plan.


Thanks for the reply @teodor,

I don’t understand how though… My script imports a json of 25 x 25 cells… Surely not 128mb…

Shouldn’t the session restart with another device or browser? If not when? Why an I able to access other pages importing much larger jsons?


Still not accessible…

  • When does the “session” reset?
  • Where can I see session memory counts?
  • How are the sessions tracked? Some users of my site are not effected. Different devices or browsers don’t reset the session…

Please help, one page unable to load for 12+ hrs now…


What site is this affecting?

Have you tried emptying the /tmp/ if you have one?


The page is behind a login but it is:


Other pages which should use more memory …NRL/talentpool.php and …NRL/playerummary.php for example are fine.


It is working fine on my end



  • How can you even access that page without a login?
  • Why can some people run the page and others get memory allocation exhausted?
  • When does the session reset as there is no way a small json uses 128m on one page load?
  • why would it have worked a day ago for everyone?



I just had a chance to add echo memory_get_peak_usage() to the last line of my local test site. It returned only 601040 (600kB).

My error message said I had exceeded 128MB on the live php page. There is obviously an error in how it is determining how much memory the script is using. Please look into this ASAP.


I have changed your PHP version. Does issue still persists?


Thanks @teodor, but unfortunately the issue is still there.

I appreciate your efforts.


Buying a paid plan is your only choice. :wink:


How much PHP script memory is available per session on the paid plan?


Much more than at 000webhost. And it is managed in another way. You receive no errors on premium plan.

I can’t give a specific number because we’re separate departments. Please contact Hostinger Support for questions related to paid plans.

Black Friday Sale 90% OFF