Jump to content

[Solved] Allowed memory size of 134217728 bytes exhausted


exciter

Recommended Posts

Hello,

 

for highcharts I fetch my data with a php script (json) from a mysql table.

When I try to build the chart with all records of the database, I get the following messsage in the error log:

Allowed memory size of 134217728 bytes exhausted (tried to allocate 24657951 bytes)

Please raise the memory limit for my account (exciter), so I can use the script and the data of my table.

I will run the script 2-3 times per day, after setting up everything ;)

Thanks!
 

Link to comment
Share on other sites

I'll pass this to Krydos, but I have a feeling that this limit cannot be increased any further. 128MB is already a lot of memory for one script.

 

If you need more than 128MB of memory, the script is too heavy to be run here. It sounds like you're either using poorly written code, or you've outgrown our service.

Link to comment
Share on other sites

The memory limit on Tommy's php 7.3 is already 128 MB which is the maximum we're going to be able to do for now. We are currently experiencing a lot of load spikes on Tommy that are primarily caused by high memory usage by php. If you need more than 128 MB I would recommend a vps https://www.heliohost.org/vps/ where you'll have root access to set the memory limits to whatever you want. Another option would be switching to the Johnny server where uptime doesn't matter as much. We try to keep Tommy consistently in the 99%+ uptime range, while Johnny is currently about 85% uptime over the last week.

Link to comment
Share on other sites

  • 2 weeks later...

I got the info, that it maybe depends on the precision in the php.ini.

Tested on another server:

 

ini_set('precision'40);
$value 29.915;

echo 
json_encode($value);
-> 29.91699999999999914734871708787977695465 

That's what I get on Tommy too.

 

And with:

ini_set('precision'14);
$value 29.915;

echo 
json_encode($value);
-> 29.917 

How can I decrease the php precision to 14?

Edited by exciter
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...