Gateway Error – Long Load Time
-
I am currently using your plugin “Enable Media Replace“ to replace images in my wordpress site. It takes very long to complete one replacement and due to this I am getting a gateway error messeage from the hosting provider (WP Engine). (“A request for either a page, script, process, or query has taken too long to complete and has been cancelled due to a bad gateway. You should visit your error log for more information.“)
Can you confirm that it is normal that it takes that long to replace the file? Anything I can do about it? If not, this would mean that your plugin is not compatible with WP Engine as I cannot change this setting (it kills scripts that take longer than 60 seconds).
-
Hi @neunhaeuserer,
No, it is not normal that takes that long. It should take, at most, a few seconds, and that’s in case your internet connection is extremely bad and you are uploading a huge image.
We have many clients with WP Engine, and I personally tried the plugin on WP Engine as well, and everything is working flawlessly, so the plugin is compatible with WP Engine.
I would suggest contacting WP Engine for further assistance. They should be able to help you. You can also try to deactivate all plugins except Enable Media Replace, and activate them one by one while you try to reproduce the issue. This will help you locate what plugin (if the issue is indeed another plugin) is causing this behaviour.
Have a good one!
Dear Gerard
the internet connection is good and the images are between 2-5MB max.
I have also deactivated ALL plugins and the issue is still there.
I have even tried to install the plugin in a complete differente environment (this site uses the very common AVADA theme) and the load time was the same. It takes about 1 minute (sometimes even more).
I have also talked to WP Engine and they said that the Server is of optimal performance, and as expected. We have even deactivated the “Long Process Killer“ too, so that we can at least proceed with the replacement. But is is not the solution to the problem because A) it slows down the content management process extremely and B) we would like to activate the Long Process Killer again to optimize server performance.Can you look into this again?
Hi there!
I just tried (again) Enable Media Replace on a live site with WP Engine, and everything is working properly.
Could you please provide all your Site Info (Tools > Site Health > Info)?
It would also be useful if you could try to reproduce the issue on a completely new WordPress installation on your own server and see what’s the behaviour there.
Finally, WP Engine’s support team must have some kind of logs or records where we can know more about the error. Can you ask them, please? As you can understand, without any other information, and knowing that we can’t reproduce the issue, it’s quite difficult for us to know what’s happening :-(.
Thank you!
Would it be possible to switch to a private thread or email conversation. I think it would be the easiest to provide you with access to the backend of a demo page. I tested the issue on a completely different page, and we see the exact same issue there.
I am also sending you all the info you asked for:
WP Engine
I got the nginx access log – it stores everything including error logs. How can I best send the document to you? It is 24 pages long.Here is the site info you requested:
### wp-core ### version: 5.9 site_language: en_US user_language: en_US timezone: +00:00 permalink: /%year%/%monthnum%/%postname%/ https_status: true multisite: false user_registration: 0 blog_public: 0 default_comment_status: open environment_type: production user_count: 3 dotorg_communication: true ### wp-paths-sizes ### wordpress_path: /nas/content/live/wvchdev wordpress_size: 117.84 MB (123566238 bytes) uploads_path: /nas/content/live/wvchdev/wp-content/uploads uploads_size: 376.33 MB (394607748 bytes) themes_path: /nas/content/live/wvchdev/wp-content/themes themes_size: 32.49 MB (34068519 bytes) plugins_path: /nas/content/live/wvchdev/wp-content/plugins plugins_size: 212.18 MB (222486101 bytes) database_size: 80.98 MB (84918272 bytes) total_size: 819.82 MB (859646878 bytes) ### wp-dropins (2) ### advanced-cache.php: true object-cache.php: true ### wp-active-theme ### name: worldvisionch (worldvisionch) version: 1.0.0 author: welance author_website: https://welance.com parent_theme: none theme_features: core-block-patterns, widgets-block-editor, title-tag, menus, post-thumbnails, html5, editor-style theme_path: /nas/content/live/wvchdev/wp-content/themes/worldvisionch auto_update: Disabled ### wp-themes-inactive (1) ### Twenty Twenty-Two: version: 1.0, author: the WordPress team (latest version: 1.1), Auto-updates disabled ### wp-mu-plugins (7) ### autoload.php: author: (undefined), version: (undefined) Force Strong Passwords - WPE Edition: version: 1.8.0, author: Jason Cosper WPE ElasticPress Autosuggest Logger: version: 1.0.0, author: WP Engine WP Engine Cache Plugin: version: 1.0.8, author: WP Engine WP Engine Seamless Login Plugin: version: 1.5.5, author: WP Engine WP Engine Security Auditor: version: 1.0.10, author: wpengine WP Engine System: version: 5.0.1, author: WP Engine ### wp-plugins-active (12) ### Advanced Custom Fields PRO: version: 5.11.4, author: Delicious Brains (latest version: 5.12), Auto-updates disabled Better Search Replace: version: 1.3.4, author: Delicious Brains, Auto-updates disabled Classic Editor: version: 1.6.2, author: WordPress Contributors, Auto-updates disabled Enable Media Replace: version: 3.6.3, author: ShortPixel, Auto-updates disabled Gravity Forms: version: 2.5.16, author: Gravity Forms, Auto-updates disabled Imsanity: version: 2.7.2, author: Exactly WWW, Auto-updates disabled MapSVG: version: 5.15.0, author: Roman S. Stepanov, Auto-updates disabled Regenerate Thumbnails: version: 3.1.5, author: Alex Mills (Viper007Bond), Auto-updates disabled Timber: version: 1.19.1, author: Jared Novack + Upstatement, Auto-updates disabled Welance Gravity Forms: version: 1.0.0, author: Welance, Auto-updates disabled WPML Multilingual CMS: version: 4.5.5, author: OnTheGoSystems, Auto-updates disabled Yoast Duplicate Post: version: 4.4, author: Enrico Battocchi & Team Yoast, Auto-updates disabled ### wp-plugins-inactive (19) ### 404page - your smart custom 404 error page: version: 11.3.0, author: Peter Raschendorfer, Auto-updates disabled ACF Content Analysis For Seopress: version: 1.0.3, author: Ziepman, Auto-updates disabled ActiveCampaign Integration: version: 0.0.1, author: Welance, Allyson Souza, Auto-updates disabled Admin Columns: version: 4.4.5, author: AdminColumns.com, Auto-updates disabled Adminimize: version: 1.11.7, author: Frank Bültge, Auto-updates disabled Akismet Anti-Spam: version: 4.2.2, author: Automattic, Auto-updates disabled Defender Pro: version: 2.6.5, author: WPMU DEV, Auto-updates disabled Gravity Forms ActiveCampaign Add-On: version: 1.9, author: Gravity Forms, Auto-updates disabled Gravity Forms Multilingual: version: 1.6.3, author: OnTheGoSystems, Auto-updates disabled Hummingbird Pro: version: 3.2.1, author: WPMU DEV, Auto-updates disabled If-So: version: 1.5.6, author: If So Plugin (latest version: 1.5.6.2), Auto-updates disabled Members: version: 3.1.7, author: MemberPress, Auto-updates disabled SEOPress: version: 5.4.4, author: SEOPress (latest version: 5.5.1), Auto-updates disabled SEOPress PRO: version: 5.3.1, author: SEOPress, Auto-updates disabled Smush Pro: version: 3.9.4, author: WPMU DEV, Auto-updates disabled Theia Smart Thumbnails: version: 2.2.2, author: WeCodePixels, Auto-updates disabled WPML Media: version: 2.7.0, author: OnTheGoSystems, Auto-updates disabled WPML String Translation: version: 3.2.1, author: OnTheGoSystems, Auto-updates disabled WPMU DEV Dashboard: version: 4.11.8, author: WPMU DEV, Auto-updates disabled ### wp-media ### image_editor: WP_Image_Editor_Imagick imagick_module_version: 1687 imagemagick_version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 https://www.imagemagick.org imagick_version: 3.5.1 file_uploads: File uploads is turned off post_max_size: 100M upload_max_filesize: 50M max_effective_size: 50 MB max_file_uploads: 20 imagick_limits: imagick::RESOURCETYPE_AREA: 137 MB imagick::RESOURCETYPE_DISK: 1073741824 imagick::RESOURCETYPE_FILE: 6144 imagick::RESOURCETYPE_MAP: 512 MB imagick::RESOURCETYPE_MEMORY: 256 MB imagick::RESOURCETYPE_THREAD: 1 imagemagick_file_formats: 3FR, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV gd_version: 2.2.5 gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM ghostscript_version: unknown ### wp-server ### server_architecture: Linux 5.4.0-1025-gcp x86_64 httpd_software: Apache php_version: 7.4.26 64bit php_sapi: apache2handler max_input_variables: 10000 time_limit: 3600 memory_limit: 512M max_input_time: 3600 upload_max_filesize: 50M php_post_max_size: 100M curl_version: 7.58.0 OpenSSL/1.1.1 suhosin: false imagick_availability: true pretty_permalinks: true htaccess_extra_rules: false ### wp-database ### extension: mysqli server_version: 5.7.36-39-log client_version: mysqlnd 7.4.26 max_allowed_packet: 16777216 max_connections: 500 ### wp-constants ### WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /nas/content/live/wvchdev/wp-content WP_PLUGIN_DIR: /nas/content/live/wvchdev/wp-content/plugins WP_MEMORY_LIMIT: 40M WP_MAX_MEMORY_LIMIT: 512M WP_DEBUG: true WP_DEBUG_DISPLAY: false WP_DEBUG_LOG: true SCRIPT_DEBUG: false WP_CACHE: true CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_ENVIRONMENT_TYPE: Undefined DB_CHARSET: utf8 DB_COLLATE: utf8_unicode_ci ### wp-filesystem ### wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable mu-plugins: writable
Hi there,
Thanks for the information. If you want to switch to a private thread, feel free to send an e-mail at [email protected] ??
Cheers,
Marking this topic as resolved.
For those people experiencing the same issue:
Our devs checked this problem and found out that the issue is Smush PRO. Without it, everything seems to run normally in terms of time processing.
When our plugin calls the WordPress function to generate thumbnails ( wp_generate_attachment_metadata ), it stalls for about a minute with Smush active. This plugin is probably plugged in to that hook to optimize images. On the Media Library it says it smushes 44 images using the example entry there, so we can imagine that will take a while, especially if the images are big.
- The topic ‘Gateway Error – Long Load Time’ is closed to new replies.