Custom Business Logic code returns but with error message (execution takes more than 20s)

Hello,
I have a problem with the Custom Business Logic. I’m having same problem with Login and Custom Event. So the server code returns, but on the iOS / Android side, the API returns Fault message: “Custom business logic execution has been terminated because it did not complete in permitted time - 20 seconds”

This is the error mesage in CodeRunner. Please note that this error message appear AFTER the server code returns. Also, it does not happen all the time. Sometimes it works well without any problem, but other times always error.

[ERROR] Unexpected end of stream.
redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:198) ~[CodeRunner.jar:na]
at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40) ~[CodeRunner.jar:na]
at redis.clients.jedis.Protocol.process(Protocol.java:132) ~[CodeRunner.jar:na]
at redis.clients.jedis.Protocol.read(Protocol.java:196) ~[CodeRunner.jar:na]
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:288) ~[CodeRunner.jar:na]
at redis.clients.jedis.Connection.getIntegerReply(Connection.java:213) ~[CodeRunner.jar:na]
at redis.clients.jedis.BinaryJedis.rpush(BinaryJedis.java:954) ~[CodeRunner.jar:na]
at com.backendless.coderunner.processor.ResponderProcessor.run(ResponderProcessor.java:56) ~[CodeRunner.jar:na]

Any idea what happened?

Thanks before for the help.

This happens when the total time spent in a code runner method (including the time to send data to code runner and get result back) is greater than 20 seconds. We’re making a few changes to relax that rule for the debug mode of code runner.

Regards,
Mark

On my side I had some similar issue with a complete different cause.

I select database 1 in my code on my JedisConnection and the REDIS is running in a VM.

However when I select 0 the exception warns me about setting configuration like this:

CONFIG SET protected-mode no
or setup an authentication

When I do set the config it solves the issue for both database 0 and 1.

Hope this will help.