Meris Tarhanis
04/26/2022, 1:08 PMFailed to send response because the lambda function is disconnected
How it happens:
• I send API request to my API
• API recognizes the request and triggers the right lambda
• lambda starts doing its work, parses in the data from the request body, sends the query to the RDS etc..
• I receive the Internal Server Error, 500 as response to my request
• SST send me the above message ("Failed to send response because the lambda function is disconnected")
• SST prints out the "real" response Message in the console, (200, body of a successful request*)
What I think is the problem:
My lambda function doesn't wait for the Response from the DB before sending it back to the client. So my question is, how do I make my lambda functions pre-connect to the RDS and wait out for the response?Ross Coundon
04/26/2022, 1:17 PMMeris Tarhanis
04/26/2022, 1:19 PMRoss Coundon
04/26/2022, 1:20 PMthdxr
04/26/2022, 1:22 PMthdxr
04/26/2022, 1:22 PMthdxr
04/26/2022, 1:22 PMthdxr
04/26/2022, 1:23 PMMeris Tarhanis
04/26/2022, 1:23 PMthdxr
04/26/2022, 1:24 PMthdxr
04/26/2022, 1:24 PMthdxr
04/26/2022, 1:24 PMMeris Tarhanis
04/26/2022, 1:25 PMthdxr
04/26/2022, 1:25 PMthdxr
04/26/2022, 1:26 PMMeris Tarhanis
04/26/2022, 1:31 PMMeris Tarhanis
04/26/2022, 2:37 PMthdxr
04/26/2022, 2:41 PMMeris Tarhanis
04/26/2022, 2:46 PMFrank
Frank
Frank
Frank
Frank
Frank
autoPause
was set to process.env.AUTO_PAUSE
which has a string value ie. "true"
, changing it to process.env.AUTO_PAUSE === "true"
worked.