Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retry on PROTOCOL_CONNECTION_LOST error does not work with RDS #93

Open
param-vir opened this issue Dec 14, 2020 · 0 comments
Open

retry on PROTOCOL_CONNECTION_LOST error does not work with RDS #93

param-vir opened this issue Dec 14, 2020 · 0 comments

Comments

@param-vir
Copy link

param-vir commented Dec 14, 2020

We are having this intermittent connection issue when AWS lambda tries to make queries on Amazon RDS. There is already another issue with same error listed on github and is marked as resolved ( https://github.com/jeremydaly/serverless-mysql/pull/68/files ) and this does not resolves the connection issue that we are having with RDS. I have added the stacktrace for reference. Also this stacktrace only appears once which makes me think that retry is actually not working properly for some reason since lambda does not fetch results and fails.

I have already checked max connections which are set to 200 for RDS and from the RDS monitoring console max connections reached only 150 which is why I am inclined towards ruling out max parallel connections reached issue.

2020-11-27T10:45:33.009Z 1e955f8d-171e-456f-ab0a-1cae27f4d8e2 ERROR Error: Connection lost: The server closed the connection.
 at Protocol.end (/var/task/node_modules/mysql/lib/protocol/Protocol.js:112:13)
 at Socket.<anonymous> (/var/task/node_modules/mysql/lib/Connection.js:94:28)
 at Socket.<anonymous> (/var/task/node_modules/mysql/lib/Connection.js:526:10)
 at Socket.emit (events.js:326:22)
 at Socket.EventEmitter.emit (domain.js:483:12)
 at endReadableNT (_stream_readable.js:1223:12)
 at processTicksAndRejections (internal/process/task_queues.js:84:21)
 --------------------
 at Protocol._enqueue (/var/task/node_modules/mysql/lib/protocol/Protocol.js:144:48)
 at Connection.query (/var/task/node_modules/mysql/lib/Connection.js:198:25)
 at /var/task/node_modules/serverless-mysql/index.js:189:25
 at new Promise (<anonymous>)
 at Object.query (/var/task/node_modules/serverless-mysql/index.js:185:12) {
 fatal: true,
 code: 'PROTOCOL_CONNECTION_LOST'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant