I have a nice VPS with 4 cores, 180ssd, 8gb of ram.
My website is a custom website, that autogenerates from a database, and on the first run it is cached in memory using redis.
The issue that I am having is that sometimes, specially after I flush redis, I get 503 on the website, I have some other domains on the same server and they are fine.
I am using Apache2 and nginx as a proxy to apache.
I have checked logs for errors, and nothing strange there, I enabled slow queries on mariadb to see if any query was killing the server and nothing there too.
What steps can be performed to debug a possible cause for this?
I started received a small number of queries from my website so I believe I maybe having this issue a lot but never noticed it before.
If the generation takes long, it could be a timeout between reverse proxy and server (check the nginx logs)
It could also be a failed process that can't handle an empty cache which might get rendered as 503 (should be 500 actually). What kind of app is it? Python, PHP, ...? (apache's or your app's logs)
You can call your server directly just like the proxy would do (from the proxy host or server host, probably with an internal IP).