Redis Error
Redis Error
While deploying , I am getting this error. on local machine It working properly . but while deploying same on Railway app am facing the below issue.
ConnectionTimeoutError: Connection timeout
at Socket.<anonymous> (/app/node_modules/@redis/client/dist/lib/client/socket.js:142:124)
at Object.onceWrapper (node:events:628:28)
at Socket.emit (node:events:514:28)
at Socket._onTimeout (node:net:589:8)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)
error: Error: Connection timeout
at Socket.<anonymous> (/app/node_modules/@redis/client/dist/lib/client/socket.js:142:124)
at Object.onceWrapper (node:events:628:28)
at Socket.emit (node:events:514:28)
at Socket._onTimeout (node:net:589:8)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)
[nodemon] app crashed - waiting for file changes before starting.
22 Replies
Project ID:
N/A
where do i get project id
quickest way is through the URL
otherwise you can press ctrl+k on your deployment, click on debug info and you should have it there
a3f276ee-0ba4-4764-a173-1723fc3cbd42
Are you sure you're connecting to the right URL?
like you're not connecting to localhost or something, right?
yeah
I very sure that i am connect to redis server . which is also on railway app
can you please share the entirety of your logs?
https://bookmarklets.up.railway.app/log-downloader/ cause the one u sent its unreadable for me on mobile π
but that seems like a connection issue
Here is the deployment log
using nodemon in prod π€
first off, never use nodemon on railway, second, increase the connection timeout
sure
let me try that
bro facing same error.
still.
how are you connecting to your redis database?
through REDIS_HOST=
REDIS_PORT=
REDIS_USER=
REDIS_PASS
the railway provided variables?
yeah
its working local machine.
but while deploying its throwing error.
I don't understand how that's possible
turn off private networking
@Audi ^
hey @Brody thankyou so much man. It worked
turning of privat
increasing the connection time limit or connection retry attempts would have also worked
ohk got it.