[CBL] 15000 error when process actually takes less than a second

I’m getting the following error when I try to run a deployed code on Custom Business Logic. It is a custom event:

Object {code: 15000, message: "Custom business logic execution has been terminate…it did not complete in permitted time - 5 seconds", statusCode: 400}

But the same code when I run on debug, it returns (within a couple of seconds) and performs the function as expected.

Please help.

Hello!

Do you have this problem permanently? Also, what coderunner do you use? I mean Java/JS/PHP ?

Yea the problem seems to be permanent today. I was debugging it and when I deployed it, the error is occurring.

And I’m running the coderunner on JS/Node.JS.

So, it has been working fine until today? Or you haven’t tried it in production mode before?

I’m not sure. This is first time I’ve added the complete project (along with additional node modules) and deployed. Earlier it was only on debug.

Hi

Do you perform an asynchronous operation in your business logic ?
If so, make sure it is wrapped into returned Promise.
See an example here

Otherwise your business logic may be interrupted in production

Provide your application id please.

No. It is not async. Async has given me a whole lot of issues earlier so I moved to normal synchronous.