Support » Plugin: Fix Media Library » Processing ultimately fails

  • Resolved kendawes

    (@kendawes)


    Hi!
    I’m trying your plugin on a client’s site and it works great… Up to a point.

    My client is an avid blogger and has been for years (since 2009). The plugin reports around 110,000 attachments!

    However, for some as yet unknown reason, the processing fails. With so much to go through, it takes a couple of days and then fails.

    More accurately, it will sometimes stop and say that the processing was incomplete and I should continue or start the processing anew. Often I can hit continue and it will do so, but every time, at some point, the processing fails and will no longer continue. I’ve tried to run it again from the beginning and the same scenario occurs again. …Although it does seem to make it further each time – Most recently it got to within 2000 attachments from being complete!

    Will running the processing multiple times damage the image quality? On a repeat run, it appears to find errors in the same folders its previously successfully processed – Should that happen?

    I’ve looked in the logs and do not see any problem noted when the processing does fail.

    Any idea why it might fail like it does? Might there be something in the code I could tweak to help?

    Any advice you could provide would be most welcome!

    Thanks!
    Ken

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author wowpress.host

    (@wowpresshost)

    > Will running the processing multiple times damage the image quality?

    No. It doesn’t touch original image, only builds original->thumbnails, that process is idempotent.

    > On a repeat run, it appears to find errors in the same folders its previously successfully processed – Should that happen?

    No in ideal world. But that easily may happen when theme or plugin used that violates WordPress best practices and adds some unregistered images.

    > Any idea why it might fail like it does? Might there be something in the code I could tweak to help?

    There are 2 types of problems when it may fail – temporary server overload so it fails to process requests, and permanent ones when it just can’t process some operation.
    First type may happen when webserver works on it’s edge and extra visitors load comes – it just starts to decline new requests and those issued by plugin will fail. Plugin tries 5 times and asks for manual action.

    Second one is when some image just can’t be processed. Usually that happens when too big image was uploaded and server’s memory limit set doesn’t allow to transform that image. In this case you may replace image with smaller one manually or increase memory limit.

    > Although it does seem to make it further each time – Most recently it got to within 2000 attachments from being complete!

    Since it goes further each time – i’d bet you have the first case.

    In any case on well configured server you will have some messages in your error log when server fails to process request. If not – it may be a good question to your hosting provider why you get HTTP 500 and nothing in your error log.

    kendawes

    (@kendawes)

    Thanks for the comprehensive reply!

    I wanted to let you know that I found the culprit for the processing failure that instigated my question to you.

    Looking at the log, I could see the the post number that was repeatedly failing. It turned out to be the attachment page for an 8M png image… Huge!!!
    I copied the image to my computer, resized and made it into a far smaller jpg, went to the post with the png, substituted my new version and saved. I then went into the Media Library and deleted the monster png.
    I restarted the processing and Voila!!! the processing successfully went onward!
    Thanks again for a wonderfully useful plugin!

    Plugin Author wowpress.host

    (@wowpresshost)

    Thanks for returning back with a solution description.
    So it was PHP memory limit issue, when it just can’t load image for resizing into memory and process is killed.

    Will try to add more info in plugin’s UI in a case of that situation, looks like it’s rather common problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Processing ultimately fails’ is closed to new replies.