Issue connecting to Redis from Cron job

Hey,

We can’t connect from our Render Cron Jobs to our Render Redis instance
We’re using the same region, and same code works on AWS (but not on render)

Dec 26 06:40:16 PM [ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
Dec 26 06:40:16 PM at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1471:16)

This issue was raised before but was marked as an application issue (incorrectly imo)

Hey Ali,
From your log output there, 127.0.0.1:6379 would be a Redis running on the same instance as the code is, which probably isn’t what you want to be happening here so is very much an application issue, if you’re using a Render Redis then you need to make sure you’re using the Redis internal connection string from the Cron job to connect to the Redis

John B

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.