Jump to content
Toyuko

PHP Memory size issue

Recommended Posts

I was trying to accept pireps at my VA and i got this error, so right now i cannot accept them. "Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2989 bytes) in ...core/classes/ezdb/ezdb_mysql.class.php on line 273"

http://prntscr.com/3v9w71

Now i know i need to increase the PHP memory limit size but what value should i increase it to? Can i do it myself or does my host need to do it? How can i find out the current size limit? How do i do it?

Any help is very welcome!

Share this post


Link to post
Share on other sites

You can try to set it in your localconfig.php like explained in this post:

http://forum.phpvms.net/topic/3998-memory-on-server-issues/

If that doesnt work you need to change it in your php.ini file or ask your host to do it if you dont have access to that file.

Here i have also Posted other ways to fix it instead of just increasing the memory limits again and again.

http://forum.phpvms.net/topic/16780-admin-error-on-pirep-aproval/#entry84755

http://forum.phpvms.net/topic/8785-out-of-memory/#entry58883

Share this post


Link to post
Share on other sites

I contacted my host and got the limit upped but then my installations went blank (white page) so we had to revert to the previous setting. I tryed the localconfig fix again blank white page...

Share this post


Link to post
Share on other sites

Or it could be my code the files Codon, vars and Pilotdata.class.php were modified due to the PHP5.4 error (later fixed). Do you think it could be due to the modded code in those files?

Share this post


Link to post
Share on other sites

I have tried everything and I still get this error i dont know what to do now. All the steps above have been used to no avail and i dont have top pilot beta.

Share this post


Link to post
Share on other sites

If it is only on the PIREP accept function I would look at your code that is contained in that function and see if there is something added that may be making it use more memory than expected. Looking at the approve_pirep_post function I see these functions in a default install;

SchedulesData::IncrementFlownCount($pirep_details->code, $pirep_details->flightnum);
PIREPData::ChangePIREPStatus($pirepid, PIREP_ACCEPTED); // 1 is accepted
PilotData::UpdateFlightData($pirep_details->pilotid, $pirep_details->flighttime, 1);
PilotData::UpdatePilotPay($pirep_details->pilotid, $pirep_details->flighttime);

RanksData::CalculateUpdatePilotRank($pirep_details->pilotid);
PilotData::GenerateSignature($pirep_details->pilotid);
StatsData::UpdateTotalHours();

If this is the same as what you have I would try disabling the UpdateTotalHours function and try approving a PIREP and see what you get. I know that uses a fair amount of memory. Unless you have changed it the UpdatePilotPay can also use a lot of memory as it recounts the pay from all of the pilots PIREPs.

Share this post


Link to post
Share on other sites

I have the same memory problems, so I disabeld the StatsData::UpdateTotalHours(); and the pirpep approval worked again!

But Now I get this memory error when running the maintenance.php script or the reset hours function in the Admin menu. Is this a big problem?

Or is there a way to reduce memory usage of the StatsData::UpdateTotalHours(); function?

We have 13774 Pireps and a Memory Size of 128 MB.

post-45014-0-90188000-1476613387_thumb.jpg

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...