deepstream.io-client-java icon indicating copy to clipboard operation
deepstream.io-client-java copied to clipboard

Server that uses deepstream client has CPU 100% when deepstream server stopped

Open jamesalexscott opened this issue 8 years ago • 3 comments

I'm running a Jersey/Spring based API on Tomcat 8 that uses the deepstream Java client to connect to deepstream and then send various RPC requests. I've been developing and testing on Windows and everything has been fine.

Now I'm moving it into production on AWS (latest Linux on a t2.small). If I stop the deepstream server, the CPU immediately goes to 100% for the Tomcat process. When I restart deepstream and the API logs back in to deepstream but the CPU still remains at 100%. Only a Tomcat restart fixes it.

I'm also using the client in Android and it has the same issue. Though CPU goes from 5% to 60%

jamesalexscott avatar Aug 28 '17 06:08 jamesalexscott

We just saw the same issue on our java clients when restarting aws ds servers. Even with 'wrapped' re-connection logic (full client.close(), client=null, client=new DeepstreamClient, client.login) - no recovery, our service nodes need full restarts.

honorcode avatar Aug 28 '17 18:08 honorcode

It wasn't the change from Windows to Linux. It was the change from ws to wss. Seems there may be an infinite loop issue with the underlying Java-Websocket.

Doesn't look like it will be fixed until 1.3.5

https://github.com/TooTallNate/Java-WebSocket/issues/424

jamesalexscott avatar Aug 29 '17 01:08 jamesalexscott

Thanks for raising, we'll need to get a release date for java websocket 1.3.5 asap. A temporary workaround for backend services could be switching back to ws and using e.g. https://www.stunnel.org/index.html for encryption On 29 Aug 2017 03:21, "jamesalexscott" [email protected] wrote:

It wasn't the change from Windows to Linux. It was the change from ws to wss. Seems there may be an infinite loop issue with the underlying Java-Websocket.

Doesn't look like it will be fixed until 1.3.5

TooTallNate/Java-WebSocket#424 https://github.com/TooTallNate/Java-WebSocket/issues/424

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/deepstreamIO/deepstream.io-client-java/issues/104#issuecomment-325526972, or mute the thread https://github.com/notifications/unsubscribe-auth/ABbx5QqmFBa5A2iCXpwxNplwZXl2G7h0ks5sc2epgaJpZM4PEIra .

WolframHempel avatar Aug 29 '17 03:08 WolframHempel