How to find out about 504 errors and the reasons?

(Pad Pors) #1

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:


  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:

Site doesn't launch after bringing back nginx reverse proxy
(Gary McPherson) #3

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:

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

(Pad Pors) #4

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.

(Pad Pors) #5

another important question:

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

(Pad Pors) #6

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?

(Pad Pors) #7

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