Problem with Hosted API - Thread Death

Hosted API doesn’t work intermittently. Sometimes I get the following error while executing the hosted api asynchronously:
error message - ExceptionClass:“ThreadDeath” {Msg:“none”, Cause:"none”}
error code - 400

Other times, I get “service invocation failed by timeout exception”. I see a lot of threads on this issue.

Can someone please help me with this? Need to be RCA’ed asap. This is in production, and resulting in data loss due to these errors.

Thank you.

Hi @Harpreet Singh
Seems like your code perform some long-running tasks, while there is a strict timing limit on CBL - 5s. You can purchase functional pack (“Expanded code execution time (20 sec)”) to increase the timeout.
Artur

Thanks for your response. Shouldn’t that be added to the cause of the exception?