• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Wordpress checkout 504 nginx error

Hammers007

New Pleskian
Hello,

I'm struggling to resolve an issue on 1 of my websites.

Server is running Nginx (no apache) - FPM served by nginx.

1 wordpress website has started suffering a 504 error.
The Wp-admin login page, pressing refresh however, it has done the login and enters the admin panel.

The other page is the wordpress checkout after pressing submit - it hits the 120s execution timeout and errors.

The log entry shows the following:
2021-09-16 21:49:19ErrorIP504POST /?wc-ajax=checkout HTTP/2.0
https://staging.violetsfloraldesigns.co.uk/checkout/
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0
160 nginx SSL/TLS access
2021-09-16 21:49:19ErrorIP229813#0: *657 upstream timed out (110: Connection timed out) while reading response header from upstreamnginx error

The order has also gone through - just not indication of it client side.

The website is now down to basics - Storefront theme, all plugins disabled bar Woocommerce and Stripe (I have tested with Stripe disabled and checking payment only).

Any suggestions on how to process will appreciated!

Some steps taken:
Fully updating wordpress + plugins
Switching to default theme + minimal plugins
Transferring to a subdomain of a working site (still didn't work),
SSH: Plesk repair web command for the domain
Disabled WAF for domain
Malware/AV scan
 
Bit of progress on this - I noticed some other similar 504 errors on forums relating to mail, which I thought would make sense based on the login and ordering with emails firing.

I disabled woocommerce email notifcations, the orders now complete and show client side.

So I appear to have narrowed it down to the mail function - my server doesn't send emails, the admin panel itself is setup to use an external server.

The site with the issue wasn't sending emails - I have setup email accounts and installed Post SMTP on to the problematic website.
This plugin when sending the test mail also timesout with a 504 error - is there likely to be some kind of backlog/queue which is causing these 504 errors?
 
You write that you have set PHP-FPM via Nginx, but the 504 indicates that Nginx is not receiving a reply from the Apache backend server. I suggest to try to disable "Proxy mode" in "Apache & Nginx settings", so that you are indeed only using Nginx. This may not resolve the underlying error, but it will focus all transactions on a single web server instead of two, so you will likely get an error log entry by nginx when the same issues shows up, which can help you solve this without the hassle of managing two different web servers.
 
Hi Peter,

Proxy mode is already off (its off on the service plan for all domains).
PHP ver 7.4.23, FPM application served by nginx.

It does seem to be when the website is trying to fire an email, including after I installed Post SMTP.
This is only on 1 site that I am aware of.
 
Back
Top