• Resolved Rick Hellewell

    (@rhellewellgmailcom)


    There seems to be some issues with emails that have multiple picture files attached. If there are too many files, the email processing times out. I am pretty sure that this is an issue with the settings on the server. If there is a timeout because the email process is not finished, the result is the ‘tmpfile’ post, and no processing of the mail/images.

    I am aware that you can compress images before emailing, but some users aren’t really geeky enough to know how to do it (and to remember to do it).

    As a test, I tried to upload 11 images, with a total file size of about 8MB. The last image successfully processed was the 6th image, and about 4MB. I had debug turned on, so I could see what got processed. It would seem that the system could do better than that.

    Note that when the processing fails, there is no error message sent to the admin when you have the ‘notify on error’ enabled. That would be nice, if possible.

    So I am looking for some general recommendations on server PHP settings that would be best to allow for processing multiple image files without timing out. I can make those changes via the php.ini file, but is there some ‘good’ values to use?

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Wayne Allen

    (@wayneallen-1)

    You’re on the right track. PHP has a setting called max_execution_time See https://www.php.net/manual/en/info.configuration.php#ini.max-execution-time that will terminiate a script once that time has been reached. Since it is terminated Postie doesn’t get a chance to tell you about it.
    You or your hosting company will need to change this value in your php.ini file.

    Thread Starter Rick Hellewell

    (@rhellewellgmailcom)

    I thought that max_execution_time would be one of the ones to change. Any recommendations? (Although probably based on number/size of images in the ‘average’ email?)

    Had a sudden thought on helping to get alerts on this issue. What if..

    – at the beginning of the Postie process, you get the max_execution_time value
    – start a timer
    – at various points thoughout the processing process (during a loop that grabs and processes each picture), you determine elapsed time (and therefore the remaining time for the processing). If the remaining time is getting too short, fire off a message to the admin alerting them to the possibility of not finishing the process due to running out of max_execution_time; give them an estimated ‘percentage of completion’, and then alerting to a possible ‘tmp_title’ entry.

    That alert to the admin would be helpful for them tweaking their max_execution_time value for their expected Postie processing ‘load’. It would also alert admin of mail that didn’t (or likely won’t) get processed.

    But, still interested in other INI file settings that would be helpful when diagnosing tmp_title issues.

    Plugin Author Wayne Allen

    (@wayneallen-1)

    There are a lot of variables to consider and the complexity is pretty high for an issue that affects almost nobody. Your best bet is to increase max_execution_time to some reasonable number and possibly change?Maximum number of emails to process to a smaller number.

    Thread Starter Rick Hellewell

    (@rhellewellgmailcom)

    Two separate multisite sites, both have the exact same Postie settings. In the php.ini Max_execution_time set to 300 (5 minutes). Only one email waiting to be processed.

    Same post, with 8 pictures about 600mb each. One site fails the Postie process, one works just fine. I manually run the ‘check mail’ thing. On the failing system, the process runs about 2 minutes, then gives me a 405 error. Six of the 8 pictures make it into the media library. After the 405 error, there are no messages in the mail queue on the server.

    Why the 405 error? And why does execution fail on one multisite, but not the other? (Since it is a multisite, all php.ini settings are the same.)

    Plugin Author Wayne Allen

    (@wayneallen-1)

    405 is a http error. You’d need to look at your web server logs to see if there is more information.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Image File Processing Limits’ is closed to new replies.