We have been facing frequent 503 on our production server since we went live 6 months back. The frequency was once a week earlier but now has increased to twice a day.
When it happens we have observed the following:
- Number of DB connections go up by 3x (without any change in actual user traffic)
- PHP-FPM has to be restarted to make it stable as the load goes to 150-200%
- Users get below display message:
Error 503 Service unavailable
service unavailable
Guru Meditation
xid: <number>
varnish cache server
We have changed the varnish server, tweaked the config based on suggestions we found in Magento DevDoc and the internet, but nothing seems to work.
Magento Enterprise support has not been helpful at all.
Kindly help!
Without looking at your server config it is very hard to guess what is going on.
When it happens we have observed the following:
- Number of DB connections go up by 3x (without any change in actual user traffic)
- PHP-FPM has to be restarted to make it stable as the load goes to 150-200%
- Users get below display message:
(without any change in actual user traffic) - How did you come to conclusion about this?
Are you referring to access logs?
To me this looks like your Apache or NGINX(Your Webserver) stop responding. This could be due to lack of server memory.
Please refer to your Webserver error log first.
When Apache or NGINX stop responding, you receive this error message from Varnish.