Open dangollayan opened 1 month ago
Hi, I've just finished troubleshooting and noticed that if the Lambda hook process exceeds 30 seconds, it returns a blank reply. Can anyone help with this issue?
@dangollayan If I'm not mistaken, LexV2 has a 30 second timeout on RecognizeText fulfillment. If the QnABot fulfillment processing exceeds this time (including lambda hook) then LexV2 will timeout the request. I believe there are some default messages that can be configured for this case in LexV2. Also, depending on your lexv2 client, the calls to LexV2 might be able to send in a streaming based request although I'm not sure how QnABot would handle this. I think the default for a timeout can be longer using streaming. I've never experimented with streaming for example from the LexWebUi AWS sample to QnABot but perhaps this would give you a chance to stream some messages while the processing is taking place on the back end lambda hook.
@dangollayan If I'm not mistaken, LexV2 has a 30 second timeout on RecognizeText fulfillment. If the QnABot fulfillment processing exceeds this time (including lambda hook) then LexV2 will timeout the request. I believe there are some default messages that can be configured for this case in LexV2. Also, depending on your lexv2 client, the calls to LexV2 might be able to send in a streaming based request although I'm not sure how QnABot would handle this. I think the default for a timeout can be longer using streaming. I've never experimented with streaming for example from the LexWebUi AWS sample to QnABot but perhaps this would give you a chance to stream some messages while the processing is taking place on the back end lambda hook.
thanks for your thoughts @bobpskier!
Hi @dangollayan Here is the link to the documentation of the timeout limit https://docs.aws.amazon.com/lexv2/latest/APIReference/API_runtime_RecognizeText.html. We will clarify in our documentation
Hi @dangollayan Here is the link to the documentation of the timeout limit https://docs.aws.amazon.com/lexv2/latest/APIReference/API_runtime_RecognizeText.html. We will clarify in our documentation
hi @fhoueto-amz, can you elaborate how can we configure the time out to QNA bot setup?
As per checking the document, it has this
@dangollayan
I would start here for the Lex API reference docs: https://docs.aws.amazon.com/lexv2/latest/dg/streaming-progress.html#progress-updates. Seems like you can specify a timeout length of up to 15 minutes (900 seconds)
@dangollayan
I would start here for the Lex API reference docs: https://docs.aws.amazon.com/lexv2/latest/dg/streaming-progress.html#progress-updates. Seems like you can specify a timeout length of up to 15 minutes (900 seconds)
Doesn't work with the solution
Hi @dangollayan ,
To answer your questions, I'd suggest to try post-processing lambda hook and examine the input event to the lambda. In that input event, you can modify sessionState as needed to set timeToLive. Before implementing this solution, you will want to evaluate if there is negative impact of this change in terms of concurrency and lambda 15 min timeout .
For more information on post-processing lambda hooks, please see Lambda Hooks
Best, Abhishek
Describe the bug The qna bot sometimes replies a blank reply/ null when using lambda hook.
To Reproduce Create an agent with knowledgebase/action group as a lambda hook then attached it to no hits intent
Expected behavior The bot should be able to reply with what the lambdah hook returned
Please complete the following information about the solution:
Screenshots no errors in fulfillment lambda as well