Skip to content
Advertisement

“start_batch was called incorrectly” on gRPC unary call

I make an unary call from PHP code like that:

JavaScript

Sometimes I get the LogicException with message “start_batch was called incorrectly”. Any thoughts how to deal with that exception and what is the root cause?

Advertisement

Answer

After some investigation I found out that the problem occurs because of reusing the instance of GrpcUnaryCall in retries. You must not do that otherwise you get a core dump.

The reason we got the LogicException but not a core dump is using a patched gRPC extension.

Some more technical details you can find in this issue

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement