Ticket #146 (new enhancement)

Opened 5 months ago

Last modified 4 weeks ago

memory_limit bottleneck and plog-download.php

Reported by: sidtheduck Owned by: mike
Priority: lowest Milestone: 2.0
Component: General Version: 1.0b3
Severity: minor Keywords:
Cc:

Description

It seems that there are quite a few discussions on the forums regarding people getting empty .zip files from plog-download.php (see here). In working with amanda in this post, I believe it to be an issue with the php.ini setting of memory_limit (and to a lesser degree max_execution_time).

That in itself is a server issue (and not a Plogger issue necessarily), but the plog-globals.php has the following code:

  @ini_set("max_execution_time", "300");
  @ini_set("memory_limit", "64M");

Thus, the user cannot increase the size of their php.ini file to allow for a larger memory_limit as the plog-globals.php will overwrite whatever their system settings are with 64M for the memory_limit and 300s for the max_execution_time timeout.

Would it be better to use conditional statements in plog-globals.php like so?

if (intval(ini_get("max_execution_time")) < 300){
   @ini_set("max_execution_time", "300");
}
if (intval(ini_get("memory_limit")) < 64){
   @ini_set("memory_limit", "64M");
}

This way, it will only overwrite the system values if they are smaller than what Plogger would like to use.

As a final thought, should we increase the memory_limit and max_execution_time for the plog-download.php script with an added:

if (intval(ini_get("max_execution_time")) < 600){
   @ini_set("max_execution_time", "600");
}
if (intval(ini_get("memory_limit")) < 200){
   @ini_set("memory_limit", "200M");
}

or have an option to increase this for downloads in the admin options?

Change History

Changed 5 months ago by anonymous

  • version set to 3.0

Changed 5 months ago by anonymous

  • type changed from defect to enhancement

Changed 4 months ago by sidtheduck

  • priority changed from normal to lowest

I fixed the bottleneck in r521, but haven't yet implemented anything for options to increase variables for plog-download.php

Changed 4 weeks ago by sidtheduck

  • milestone set to 2.0
Note: See TracTickets for help on using tickets.