You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with Docker on W10 and it takes DB a bit longer to start than my app container and I was getting Error: connect ECONNREFUSED... from client.connect(). I wanted to solve it with a timer loop with try to connect every 1 second again, but each other call of client.connect() returned an error Client has already been connected.... And that was not true, DB still hasn't started and any query called on such client ended with an error. What I had to do was to close the client and create a completely new instance on which I could try to call connect again.
My points are:
connect should be allowed to be called multiple times on one instance if the previous call ended with connection error
even if that is not wanted, the error message should not say Client has already been connected, when it is not true (again DB has not yet started)
The text was updated successfully, but these errors were encountered:
I'm working with Docker on W10 and it takes DB a bit longer to start than my app container and I was getting
Error: connect ECONNREFUSED...
fromclient.connect()
. I wanted to solve it with a timer loop with try to connect every 1 second again, but each other call ofclient.connect()
returned an errorClient has already been connected...
. And that was not true, DB still hasn't started and any query called on such client ended with an error. What I had to do was to close the client and create a completely new instance on which I could try to call connect again.My points are:
Client has already been connected
, when it is not true (again DB has not yet started)The text was updated successfully, but these errors were encountered: