3

We're running Node (v0.10.38) with Express (4.0.0), proxied through nginx (1.2.1), which usually works great. Recently, however, we switched to a new server setup. Now, roughly 30 minutes after starting up the server, the server starts returning 504s (Gateway Timeout). Accessing Node directly from the server (bypassing nginx) also times out. Every so often, we got a series of ETIMEDOUT errors from redis, but connecting to the redis server from the server works from the command line. Furthermore, the server started returning 504s even before redis errors came up anyways. Anyways, after updating our redis middleware (connect-redis) to the newest version, these errors stopped, but the 504s still occurred. However, after disabling the connection to redis in our code for 10 hours, no 504 occurred. We've tried sending a redis ping periodically to prevent the error, believing that to be the cause, but 504s continue. When not connecting to redis, the server doesn't 504, so it is likely tied to redis in some way. Anything else we can try?

Sorry if there's not much to work with. We don't have that much either, and are eager to solve this issue as soon as possible. If there's any more specifics needed, I can update the question. Thank you.

MCKapur
  • 9,127
  • 9
  • 58
  • 101

1 Answers1

0

Still don't know the root cause, but we ended up fixing this by pinging Redis every minute so that the connection wouldn't get killed.

MCKapur
  • 9,127
  • 9
  • 58
  • 101
  • we are having an identical issue with 504's right now. Did you manage to get anything beyond pinging Redis? We are using a cluster.. Were you and what method did you use for pinging Redis every minute? – Shakespeare Sep 04 '17 at 14:24