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

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( ~[CodeRunner.jar:na]
at redis.clients.util.RedisInputStream.readByte( ~[CodeRunner.jar:na]
at redis.clients.jedis.Protocol.process( ~[CodeRunner.jar:na]
at ~[CodeRunner.jar:na]
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken( ~[CodeRunner.jar:na]
at redis.clients.jedis.Connection.getIntegerReply( ~[CodeRunner.jar:na]
at redis.clients.jedis.BinaryJedis.rpush( ~[CodeRunner.jar:na]
at ~[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.


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.