Spring Websocket fails after 2100 connection

I was testing the spring websocket performance, and I am able to subscribe 2100 but after that, I get the below error:

2018-03-13 14:50:20.896 ERROR 21402 --- [ main] o.s.w.socket.sockjs.client.SockJsClient : Initial SockJS "Info" request to server failed, url=ws://localhost:53603/game

org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://localhost:53603/game/info": Socket closed; nested exception is java.net.SocketException: Socket closed


Caused by: java.net.SocketException: Socket closed

I am using the below code to call in the loop, which runs successfully for 2100 times before giving the error:

WebSocketStompClient stompClient = new WebSocketStompClient(new SockJsClient(

Collections.singletonList(new WebSocketTransport(new StandardWebSocketClient()))));

stompClient.setMessageConverter(new MappingJackson2MessageConverter());

StompSession stompSession = stompClient.connect(URL, new StompSessionHandlerAdapter()...

Read More »

By: StackOverFlow - Tuesday, 13 March

Related Posts