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 have a graphQl Lambda using serverless-mysql with mysql2. I am very rarely getting a lambda in a bad state where it cannot reconnect to the db. The sequence of errors is as follows:
ERROR { Error: This socket has been ended by the other party
at TLSSocket.writeAfterFIN [as write] (net.js:395:12)
INFO { [Error: Context creation failed: This socket has been ended by the other party]
message:
'Context creation failed: This socket has been ended by the other party',
locations: undefined,
path: undefined,
extensions:
{ code: 'INTERNAL_SERVER_ERROR',
exception: { stacktrace: [Array] } } }
ERROR { Error: Can't add new command when connection is in closed state
and then the INFO and ERROR repeat for each attempt from the browser to post to the Lambda in question.
In order to try and reproduce this, In some test code I have set the db timeout to 2 seconds and find it reconnects as expected. I have tried passing wrong user, but it fails immediately as expected and no further attempts on the connection occur with the thrown exception.
Has anyone else come across this closed socket issue and worked around it?
The text was updated successfully, but these errors were encountered:
I have a graphQl Lambda using serverless-mysql with mysql2. I am very rarely getting a lambda in a bad state where it cannot reconnect to the db. The sequence of errors is as follows:
and then the INFO and ERROR repeat for each attempt from the browser to post to the Lambda in question.
In order to try and reproduce this, In some test code I have set the db timeout to 2 seconds and find it reconnects as expected. I have tried passing wrong user, but it fails immediately as expected and no further attempts on the connection occur with the thrown exception.
Has anyone else come across this closed socket issue and worked around it?
The text was updated successfully, but these errors were encountered: