• Hi

    Thanks for the plugin.

    We are very happy with the plugin. However, when uploading large jpeg images we get the following error:

    Failed to load resource: the server responded with a status of 504 (GATEWAY_TIMEOUT)

    This comes usually from async-upload.php.

    We are using AWS for hosting, ElasticBeanstalk,PHP 7.1 running on 64bit Amazon Linux/2.7.0. I have already tried changing the Max execution time from 60 to 120 seconds and the memory limit in php.ini to 500M. It doesn’t make a difference and the timeout occurs in about a minute after starting the upload.

    Best regards
    Robert Badi

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Iulia Cazan

    (@iulia-cazan)

    Hi Robert,

    How many images sizes do you have registered and expected to be generated in a single upload? Also, what size is the image you upload (in MB and also as resolution)? Do you have the same result when you deactivate the plugin? This seems more of a server side limitation.

    Regards,
    Iulia

    Thread Starter badi365

    (@badi365)

    Hi Iulia

    emm … there are 51 different sizes, which sounds crazy, right? I just see that from the settings page for your plugin but don’t know where that is calibrated. I’m rather new to WordPress. We bought a theme for our site, so I’m guessing this is a theme setting.

    One picture is for example 2500 x 1406 px and 1.4MB that I uploaded and caused an error. When I deactivate the plugin I don’t get any errors.

    And just to be clear, the images are generated despite the timout, I just have to save a draft for the article and refresh the page and click “add file” again to be able to add it to the article being worked on.

    Best regards
    Róbert Badí

    Plugin Author Iulia Cazan

    (@iulia-cazan)

    I see. 51 images sizes are quite a lot.

    Perhaps you can look into disabling images sizes for specific post types. I think that depending on where you upload an image you know where the image is visible on the front-end and assess which are the vital image sizes needed for that to be generated. Using my plugin, you could disable most of the unused images sizes and allow only for the ones you need in the theme.

    However, my advice, in this case, would be to actually fix the theme, 51 images sizes are too much, and I presume that the image sizes only differ with few pixels, so, refactoring the theme would be the best solution.

    Let me know if this helps.

    Iulia

    • This reply was modified 6 years, 10 months ago by Iulia Cazan.
    Plugin Author Iulia Cazan

    (@iulia-cazan)

    Hi Robert,

    I just released a new version of the plugin that includes the interface for creating your own custom rules for the image sizes that are generated. Also, I added a filter that you can use for creating programmatically even more custom rules. I think that these two new features will help you reduce the number of image sizes generated on upload, I am sure you do not need all of these to be generated for every upload.

    Give it a try and let me know how it goes.
    The most up to date description of the features can be accessed at https://iuliacazan.ro/image-regenerate-select-crop/ but if I can help you with other details on this issue, let me know.

    Regards,
    Iulia

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘504 (GATEWAY_TIMEOUT)’ is closed to new replies.