Fatal error: Allowed memory size exhausted


#1

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.

Thanks.


#2

Update:

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?


#3

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.


#4

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?


#5

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…


#6

What site is this affecting?

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


#7

The page is behind a login but it is:

talentscout.000webhostapp.com/NRL/myteam.php

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


#8

It is working fine on my end


#9

@Ayu,

  • 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?

#10

UPDATE:

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.


#11

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


#12

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

I appreciate your efforts.


#13

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


#14

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


#15

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.