async-upload.php causes server to hang (high disk throughput)
-
Hello,
I’ve been experiencing this issue on and off over the last year. It only happens randomly about once every 2-3 months and is difficult to troubleshoot.
To preface, this is a WordPress Multisite deployment developed by Bitnami on Google Cloud Platform running three websites. One is basically a static landing page, the second is an e-commerce site for events ticketing, and the third is a private user portal mostly used for booking equipment. Specs are further down.
Symptoms:
Basically, when one of my admin users uploads some media (often just a photo or pdf) it causes the server to hang and become unresponsive to any type of connection (http, ssh, ftp, etc). Sometimes after about 30 minutes it will recover but occasionally I’ve had to remote shutdown the VM it’s running on which then breaks a few more things.Evidence:
Every instance of this had something to do with media upload. In early instances, we thought it was file size as one of the PDFs that caused this was quite large. However, the most recent incident was only a 500kb jpg.When the server hangs I can see on GCP monitoring that my disk throughput maxes out. My memory goes quite high as well (90%), but I can’t tell how far because a few of the monitoring tools stop reporting when this happens. This site doesn’t see all that much traffic so CPU utilization is typically below 5%, the highest peak in the last month was 30%. Memory is at about 50% utilization minimum, although after the last month it has slowly crept up to 70%. I’ve seen it peak out at 90% during one of these upload instances, and after ‘figuring things out’ it goes back down to 50%. The latest instance only dipped from 70% down to 60% for a few days and then came back to 70%. Watching the resource monitor (top) in CLI, I can see about 25% of the memory is going to mysql and another 22-25% is going to ruby processes. Is that how much they should be using? I noted my wordpress memory limit is currently set to 512MB, which is about 20% of the current RAM, is that insufficient for running a multisite (3 sites)?
After it recovered I pulled my error and access logs, the main thing I noted is in the access logs I was getting 504 errors on /wp-admin/async-upload.php and the /wp-admin/admin-ajax.php pages. The error logs didn’t say much other than some timeouts on /wp-admin/post-new.php which for all I know might be some earlier page sessions. I can post those logs if necessary.
I mean, the implication is not enough RAM, but why does the disk throughput get maxed out? What is it doing while hanging/unresponsive for half an hour and why would it be triggered by such a small media upload.
I have already requested support from bitnami for the deployment, but they’re at a loss, it appears to be WordPress issue. As far as I can tell, I don’t feel like it’s plugins either (despite that being the go-to answer) as there’s no evidence suggesting a plugin process is hanging.
Setup:
This is a Bitnami WordPress Multisite deployment on Google Cloud Platform. The VM specs are 1 vCPU (Intel Skylake), 2.75 GB memory, 20GB storage.
Wordpress details: (yes I’m aware a few things are out of date. I’m working on redeploying the whole thing and migrating to a new instance)WordPress version 5.7
Wordpress memory limit 512MB
Server info: Apache
PHP version: 7.3.14
PHP post max size: 40 MB
PHP time limit: 300
PHP max input vars: 1000
cURL version: 7.68.0, OpenSSL/1.1.1d
MySQL version: 8.0.18
Max upload size: 40 MBActive plugins (29) (pulled from the largest of the three sites)
All in One SEO by All in One SEO Team – 4.0.17
Event Tickets Plus by The Events Calendar – 5.2.2.1
Event Tickets by The Events Calendar – 5.1.2.1
The Events Calendar PRO by The Events Calendar – 5.5.0
Salient WPBakery Page Builder by Michael M – WPBakery.com | Modified by ThemeNectar – 6.6.0
Salient Core by ThemeNectar – 1.8.1
Salient Nectar Slider by ThemeNectar – 1.7
Salient Shortcodes by ThemeNectar – 1.5
Salient Social by ThemeNectar – 1.2
Salient Widgets by ThemeNectar – 1.2
The Events Calendar: Filter Bar by The Events Calendar – 5.1.0
The Events Calendar by The Events Calendar – 5.5.0
WooCommerce Square by WooCommerce – 2.4.1 (update to version 2.5.3 is available)
WooCommerce Zapier by OM4 Software – 2.2.0
WooCommerce by Automattic – 5.1.0 (update to version 5.6.0 is available)
WP Mail SMTP by WPForms – 2.7.0
Zapier for WordPress by Zapier – 1.0.2
Envato Market by Envato – 2.0.6
Customizer Export/Import by The Beaver Builder Team – 0.9.2
Really Simple SSL by Really Simple Plugins – 4.0.15
Classic Editor by WordPress Contributors – 1.6
Smash Balloon Instagram Feed by Smash Balloon – 2.9
AMP by AMP Project Contributors – 2.0.11
All In One WP Security by Tips and Tricks HQ, Peter Petreski, Ruhul, Ivy – 4.4.8
All in One SEO by All in One SEO Team – 4.0.17
Google Analytics for WordPress by MonsterInsights by MonsterInsights – 7.17.0
Hide Admin Bar From Non-admins by Stranger Studios – 1.0
Jetpack by WordPress.com by Automattic – 9.5
WP-Optimize – Clean, Compress, Cache by David Anderson, Ruhani Rabin, Team Updraft – 3.1.8Inactive plugins (22) (might be active on other parts of the multisite)
Akismet Anti-Spam by Automattic – 4.1.9
BetterDocs by WPDeveloper – 1.7.2
Contact Form 7 by Takayuki Miyoshi – 5.4
Facebook for WooCommerce by Facebook – 2.3.5
Google Ads & Marketing by Kliken by Kliken – 1.0.7
Hello Dolly by Matt Mullenweg – 1.7.2
Import Users from CSV by Andrew Lima – 1.0.1
My Private Site by David Gewirtz – 3.0.3
Redirection by John Godley – 5.1.1
Remove Dashboard Access by Drew Jaynes (DrewAPicture) – 1.1.3
Salient Demo Importer by ThemeNectar – 1.3
Salient Home Slider by ThemeNectar – 1.4
Salient Portfolio by ThemeNectar – 1.7
Simple Local Avatars by Jake Goldman, 10up – 2.2.0
TablePress by Tobias B?thge – 1.13
TaxoPress by TaxoPress – 3.0.3
UpdraftPlus – Backup/Restore by UpdraftPlus.Com, DavidAnderson – 1.16.50
User Meta Lite by Khaled Hossain – 2.3
WordPress Importer by wordpressdotorg – 0.7
WP Crontrol by John Blackbourn & crontributors – 1.10.0
WPForms Lite by WPForms – 1.6.5`
- The topic ‘async-upload.php causes server to hang (high disk throughput)’ is closed to new replies.