SIte migrated over to Hestia having random Timeout and Bad Gateway errors

I spun up a new server and started using Hestia as my CP. The specs on this new server are double of what I was running so I didn’t think resources would be an issue.
All my sites that I migrated over and working fine except for one wordpress site which since I moved it over, has been constantly having random Gateway Timeout Errors than eventually turn into Bad Gateway errors after about 10 mins. They also are not happening at any specific point in the day. Sometimes a full week goes by, sometimes only a day. I usually fix it by service php7.4-fpm restart but sometimes it will stop again with 5-10 mins, sometimes a few hours.
I am running only NGINX, no Apache, and the error log shows no issue.
I made sure the php ini was the same or more resourecs were allocated.
max_execution_time and max_input_time are both at 600 which should be more than enough for a pretty simple wordpress site.
MariaSQL is running on defaults as well as:

Site is clean of any malware. Database is clean and optimized. No really strange cron jobs running.

I’m at a bit of a loss and not sure where else to check or what logs/locations to check so any advice would be really helpful.

Many thanks!

Please check the timeouts in Nginx / Apache2 (depending on setup)

Ok thank you. There was only one difference in the timeouts which was keepalive_timeout which i bumped up to 60s which was on the old server.

I also adjusted:
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_send_timeout 300;

There were not set on the old server so I assume using defaults.

What log would I find any sort of information about timeout errors in?

What is your setup?

Default Hestia setup using nginx and php7.4 for all my sites with the only changes to set confs files I already listed above.
Server has 32gb of ram.

If Nginx is hosted in fastcgi more you have to alter:

The time outs there

1 Like

I checked on the old server and this is what I had
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;

I’ll adjust the new ones to match the timeouts and see if that corrects the issue.
Thank you!

proxy is only the case when you have Apache as well installed or using any proxy settings. My guess it will solve you issues.

Thank you again. I have made the changes and marked it as the solution and will continue to monitor. I hope this solves it :slight_smile:

Also check the access log for which requests it timeouts, I have seen wordpress setups timeout after POST requests to xmlrpc.php

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.