部署后无服务器nodejs mysql握手错误

zi8p0yeb  于 2022-12-10  发布在  Mysql
关注(0)|答案(1)|浏览(139)

I am working on serverless node basic application which has the basic function of CRUD operation with mysql. The mysql is created in the RDS Mysql and assigned to the public, In local system its connected and working fine, After the deploying serverless deploy, I am getting an error as Handshake inactivity timeout in response body. Note: I used the serverless deploy and RDS MySQL in same AWS account.

dffbzjpn

dffbzjpn1#

It sounds like you are encountering a timeout error when trying to connect to your MySQL database in Amazon RDS after deploying your serverless application. This can happen if your database is not accessible from the serverless function, or if there is an issue with the connection settings in your code.
Here are a few things you can try to troubleshoot this issue:
Make sure that your database is publicly accessible. In the Amazon RDS console, go to the "Security" section for your database and check that your security group allows incoming connections from the IP address of your serverless function.
Check the connection settings in your code. When connecting to a MySQL database from a serverless function, you will need to provide the hostname, port, username, and password for the database. Make sure these settings are correct and that the user you are using has the appropriate permissions to connect to the database.
If the issue persists, try increasing the "connect timeout" setting for the MySQL client in your code. This will allow the client to wait longer for a successful connection before timing out.
If you are still having trouble, I would recommend reaching out to the Amazon RDS support team for further assistance. They should be able to help you diagnose and resolve the issue.

相关问题