-
Notifications
You must be signed in to change notification settings - Fork 74
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
Lambda Timeout issues with new ai.conversation() #2356
Comments
Hi @cabcookie, thanks for raising the issue! We'll investigate and see what's going on, and get back to you once we have a solution. |
@cabcookie We added timeout here #2358 . Once we release this, you can use custom handler to configure timeout, see https://docs.amplify.aws/react/ai/conversation/tools/#custom-lambda-tools . However, it seems that Would it be possible to share more logs, ideally with log level set to debug? We'd like to see all logs that belong to |
I ran a prompt that created a long response again. I am using the standard handler Amplify creates. As I use the standard handler, I can't adjust the timeout time. I can do so for a custom handler after the change you mentioned. However, I tried to use a custom handler because of the issues with the standard handler. However, I ran into other issues with a custom handler as well. Which I will highlight in a separate issue. Now, back to the standard handler issue. Here are the logs:
I upgraded my dependencies to the following versions:
Afterwards I ran the prompt again. The problem is still there and here are the logs for that run:
You can see the Lambda has a timeout and then after a while launches again and in DynamoDB I can see it overwrites existing entries. |
Environment information
Data packages
Description
I am making use of the new ai.conversation() feature in my data schema. I recognized that when the LLM is responding to my input, at some point it starts replacing the message. Reason for that is that there is a Lambda being created which handles the streamed content from the LLM and writes it to DynamoDB. However, the Lambda's timeout is set to 60 seconds and if the response is quiet long, it can take more than that to stream the full response. Thus the Lambda is invoked again and overwrites the initial message. I tried to find an option to extend the Lambda's timeout but I couldn't find one. How an I solve this issue?
Some CloudWatch Log output:
The text was updated successfully, but these errors were encountered: