Hi, I have an action that takes about 2 minutes to respond. During this time the chatbot is not able to process other users for another action until the action completes. Do you have any solutions please? @erohmensing
Hi @wassimgt
I am also facing the sane issue
If u get the solution kindly share
Thanks
Hi @wassimgt @vi.kumar. What part of your action takes 2 minutes to respond? Are you doing 2 minutes of processing within your action server, or are you calling another endpoint from your action server that takes 2 minutes to return?
If the second, I recommend you make your run
method async
(which is available by default in rasa sdk > 1.6) and await
the result of your long-running endpoint
@erohmensing I spoke the other time here on my chatbot and the timeout problem,
the problem when I call another action after the prediction action (running)
Hi @erohmensing
My Query is -
RASA actions server perform the requests sequentially . If one action(say âaction_1â) is under progress and in between if another user called another action (say âaction_2â) . I found that rasa action server first complete action_1 and then process action_2.
My requirements- I want rasa actions server to perform both actions parallelly , if this doesnât happen then users will remain in waiting queue for a long time if number of users increase .
For reference, I am providing u the logs :
My rasa model server has these properties:
2020-08-26 17:39:46 DEBUG rasa.core.tracker_store - Attempting to connect to database via âsqlite://:***@/rasa_server.dbâ.
2020-08-26 17:39:46 DEBUG rasa.core.tracker_store - Connection to SQL database ârasa_server.dbâ successful.
2020-08-26 17:39:46 DEBUG rasa.core.tracker_store - Connected to SQLTrackerStore.
2020-08-26 17:39:46 DEBUG rasa.core.lock_store - Connected to lock store âInMemoryLockStoreâ.\
For two queries : i am giving you logs of rasa server and actions server.
Logs of rasa Model server -
Here u can see there are two users with sender_id {sbm.kumar , vi.kumar}
And two Queries - âFind Issuesâ and âPrediction Issuesâ\
for âfind Issuesâ -
intent - ask_find_issues_part
action - action_find_issues_part\
for âPrediction Issuesâ -
intent - ask_predict_issues_part
action - action_predict_issues_part
sbm.kumar request for âPrediction Issuesâ functionality which comes at 17:52:50
vi.kumar request for âFind Issuesâ functionality which comes at 17:52:53\
2020-08-26 17:52:50 DEBUG rasa.core.tracker_store - Recreating tracker from sender id âsbm.kumarâ 2020-08-26 17:52:50 DEBUG rasa.core.processor - Received user message â/ask_predict_issues_partâ 2020-08-26 17:52:50 DEBUG rasa.core.actions.action - Calling action endpoint to run action âaction_predict_issues_partâ.
2020-08-26 17:52:53 DEBUG rasa.core.tracker_store - Recreating tracker from sender id âvi.kumarâ 2020-08-26 17:52:53 DEBUG rasa.core.processor - Received user message â/ask_find_issues_partâ 2020-08-26 17:52:53 DEBUG rasa.core.actions.action - Calling action endpoint to run action âaction_find_issues_partâ.\
Logs of rasa actions server -
At 17:52:39 - âPrediction Issuesâ functionality executes.
âapi for predicting issues is called.â this api takes time to fetch result .
Until this api is completed there is no log of âFind Issuesâ custom action.
U can check this from timestamp.
Once âaction_predict_issues_partâ completes then at 17:53:52 âaction_find_issues_partâ starts\
[2020-08-26 17:52:39] âPOST /webhook HTTP/1.1â 200 1842 0.019000
action_predict_issues_part
api for predicting issues is called.
action_completed
[2020-08-26 17:53:52] âPOST /webhook HTTP/1.1â 200 12050 62.046102
action_find_issues_part
action_completed
My Observations-
The behaviour of Rasa Model server is Async and Parallel ,
But behaviour of Rasa Actions server to execute custom actions is sequential\
Kindly tell me what i can do or am i missing anything to make you understand my query.