Replies: 1 comment 2 replies
-
A HTTP 504 error suggests the server did accept the connection, but took too long to respond, This might happen for example when the server is overloaded. Maybe some sync I/O operations? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a Socket.IO server (4.5.2) running with pm2 on port 80.
For HTTPs connections I use an NGINX server, which redirects HTTPS to HTTP and WSS to WS.
It turns out that a few days ago the NGINX server was unable to connect to the Socket.IO server, always returning the HTTP code 504 (Time Out).
Is it possible to identify the reason for this unavailability on the Socket.IO server?
Looking at the
pm2 list
there was no restart for the application, which means that there was no error in the application that would cause it to restart and go offline.After this incident I also added the code below, I don't know if it could interfere in the future in detecting the reason for unavailability.
socket.on("error", () => {});
Beta Was this translation helpful? Give feedback.
All reactions