function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Bhumi BhalodiyaBhumi Bhalodiya 

java.net.SocketTimeoutException: Read timed out on Einstein bot transfer to agent on queue based using Omni channel

Einstien chatbot we transfer user to the Agent via queue based transfer using Omni channel.
But sometimes user get this error meesage, even we had 3 agent was online in omni channel
 
Unfortunately a system error occurred. I'll connect you to the agent who can help.


When i checked error log in Einstien bot i see that there is an error: 

 

Error: Call to path: /support/conversations/0X93l000000PJYV/invocations/0SC3l000000L8OiGAK and actionName: Bot_Live_Agent_Availability_by_Queue timed out: java.net.SocketTimeoutException: Read timed out

Once agent logged in again in Omni channel, everything started working as expected.

What could be the reason behind time out error like this.
And this happens randomly and oftnely.

Thanks
SwethaSwetha (Salesforce Developers) 
HI Bhumi,
I have seen a similar scenario in the past.Einstein Chat Bots users use Apex Action element type on Dialogs to leverage custom logic for custom chat interactions. Can you check if the custom code being invoked from the bot is taking more than 10 seconds to execute?  

You need to optimize your apex classes if they are consuming more amount of time to avoid the timeout exception.

If this information helps, please mark the answer as best. Thank you