• Resolved No1Legend

    (@no1legend)


    When I’m creating a new post and try to upload an image, the connection is lost and i have to wait for it to come back before finishing. It usually takes around 2 minutes. When connection is restored, the image is uploaded to media library and EWWW has optimized it.

    The error is:
    Connection lost. Saving has been disabled until you’re reconnected. We’re backing up this post in your browser, just in case.

    Debug Log via PasteBin
    https://pastebin.com/5dTvFGwL

    Could this be from a memory issue? Our memory_limit is already 128M

    https://www.ads-software.com/plugins/ewww-image-optimizer/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter No1Legend

    (@no1legend)

    WordPress version 4.0.1

    EWWW Version 2.1.0

    Plugin Author nosilver4u

    (@nosilver4u)

    Depends on how much memory other plugins and your theme are using. I run it on my dev site with a memory limit of 32m just fine (although I think WP increases it to 64 at runtime). Increase it to 256 and see if that changes anything, but don’t leave it that high if you don’t have the memory to spare.

    All that said, I suspect it is likely from optimizing large PNG images from what you describe. Those can take a long time to process, especially if your site is generating 10+ resizes per image.

    Thread Starter No1Legend

    (@no1legend)

    Sorry for the delay in my response. I will be testing today to see if memory is an issue.

    I have taken notice to the error occurring a lot more with .png files so your assumption is likely correct.

    What are my options if it is a memory issue?

    Plugin Author nosilver4u

    (@nosilver4u)

    It if is a PNG issue, you see if you can increase the timeout (max_execution_time), decrease the optipng/pngout levels (they go in opposite directions, make sure you’re going the right way), or see how many resizes are being generated for your images to see if you can get rid of some of those.

    To do that, you can turn on debugging, and go to the Media Library in list view, and you’ll see the raw metadata that includes all the sizes generated for each image.

    If it IS a memory issue, then you find out what plugins are using the most with something like the P3 plugin from godaddy, and/or increase the memory limit in php.

    All those limits are set by php (usually), so ask your webhost what is the appropriate way to change them.

    Thread Starter No1Legend

    (@no1legend)

    I have access to configuring PHP via WHM so I will be able to make the proper adjustments once I determine whether its a PNG issue or the memory.

    Thank you for the great support. Very quick responses. I will try to work on this error this evening so I can mark this topic resolved as soon as possible.

    Thread Starter No1Legend

    (@no1legend)

    Update:

    Changing the memory to 256 didnt help. Connection is still lost when uploading a PNG or multiple Jpgs

    I increased the timeout time to 60 seconds instead of the default 30 and still received the connection error.

    I am almost positive the issue is the amount of resizes being generated.

    Here is the raw metadata for ONE image https://pastebin.com/HGPxvqju

    I now realize that when connection is lost it is not just for me on the admin side. it is lost for the whole site so my viewers are not able to view the site either.

    Are this many resize requests from my theme?

    Plugin Author nosilver4u

    (@nosilver4u)

    Yup, having that many resizes combined with the slow processing time of PNG images will definitely do it. It’s difficult to say for sure where they all come from, but it is likely that some are from the theme, but others could be from plugins. If it is a paid theme, I would ask the developer for starters, since that is a bit excessive.

    Thread Starter No1Legend

    (@no1legend)

    Im waiting for a response from the theme developer about the 21 resizes having to be made.

    In the mean while, I cant exactly have our site lose connection every time i upload an image. We post quite frequently throughout the day.

    I was wondering if there is a way to keep EWWW from optimizing these images on upload and maybe i can bulk process them in the night when our views aren’t as heavy. Any thoughts or ideas on what i can do until i hear back from the theme developer?

    Plugin Author nosilver4u

    (@nosilver4u)

    About the only way currently to accomplish that is to deactivate EWWW until you want to do your bulk processing. There’s been a feature request to disable all the automated processing, and only use the wp-cron or bulk processing functions, but that’s likely a month or two out.

    Thread Starter No1Legend

    (@no1legend)

    I have deactivated the plugin for now during the day and am bulk resizing in the evening. It’s a pretty tedious task.

    The developer of the theme responded with :
    “this sizes is what working for all theme modules i think it necessary for page size and load time also you can use wp sumsh it i think it’s better “

    Doesn’t seem to want to be any help. Keeps marking my other support questions as resolved before they are actually resolved.

    I have tried WP-SmushIt before and had some issues with is. I can’t recall specifically what the problems were but Ewwww worked much better.

    I will have to keep working towards a solution. Maybe just optimizing images one time on the weekend or something.

    Thread Starter No1Legend

    (@no1legend)

    Oh i think i remember what the issue was with WPSmushIt. More than a handful of images wouldn’t size down due to yahoo limitations/regulations or something. Anyway, Thanks for all the help and effort in trying to help solve my issue.

    I think we can come to the conclusion that the theme is requesting too many resizes to be handled efficiently all at once.

    Plugin Author nosilver4u

    (@nosilver4u)

    The ‘dev’ version of EWWW has the ability to disable all real-time hooks now (advanced options). And I would laugh at anyone that tells you WP Smush.it is better than EWWW. Smush.it doesn’t even come close to the features and capability of EWWW (and it has that pesky 1MB filesize limit).

    That said, WPMUdev has just released a pro version that uses their servers instead of Yahoo’s and doesn’t have those limitations, but it will take them a long time to reach feature parity with EWWW (and I’m not resting on my laurels yet).

    https://downloads.www.ads-software.com/plugin/ewww-image-optimizer.zip

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Connection Lost Error When Uploading Image’ is closed to new replies.