Connection hangs in AWS Lambda when using response streaming
I know that this issue is not really drizzle related but there might be someone who can help me out
I have a lambda function that I want to use to stream responses. If I create a DB connection to make some queries within the lambda, after the streaming ends, the lambda just hangs and eventually times out.
I assume that it has to do with the fact that there is an open db connection, which I don't want to close because then I can not reuse the same db connection for following invocations.
this is my code
if i comment out
await db.select().from(userTable).where(eq(userTable.id, "test")).limit(1);
then it works fine
I attached two picture of my logs, which shows that the lambda times out when doing a db query, the other one shows that the invocations stops as it should when not doing the db query

0 Replies