How to find out about 504 errors and the reasons?

our users report some 504 bad gateway errors for accessing the instance: for example when they like a topic or try to edit their response.

the forum is on a t2-small aws instace, and the swap is 2g.

the memory usage is something like this:

image

  1. does the 504 error mean we need to extend our host and add some memory?

  2. may the error be due to the cdn (cloudflare)?

  3. may it be because of plugins and themes that are installed in our forum?

how can I find out what is the problem and how can I solve it?

thanks in advance for your help :heart:

It’s unlikely Cloudflare is the cause of this problem, the error you’re seeing is because it can’t connect to your AWS server upstream:

https://support.cloudflare.com/hc/en-us/articles/218378978-What-should-I-do-after-seeing-a-502-or-504-gateway-error-on-my-site-

Themes don’t have any significant performance impact AFAIK, but plugins can do, depending on which ones you have installed.

1 Like

thanks, the installed plugins seems few to me:

from the link, what I got was that we don’t need to extend our host either; as the traffic is not that much to overload the server.

is this error being logged anywhere on the server or cloudflare or discourse admin panel?

also is there anyway to find out what has caused the error? I’m still little bit confused about the reason.

another important question:

why some users experience this error and some not? e.g. I’ve rarely faced this problem myself!

we have lots of warnings in the admin log panel:

may this warning be the reason for the 504 error? is it ok to have this much of warnings?

are the 504 errors logged anywhere?

this problem has been solved after we removed the nginx reverse proxy and used the nginx inside docker; steps explained here.

3 Likes