Hi, I have an issue with a lot of logs about idle connections on the STOMP server(3.7.1 version) with websocket bridge.
Example from my logs:
11:35:18.486 WARN Disconnecting client io.vertx.ext.stomp.impl.StompServerWebSocketConnectionImpl@6f5765e1 - no client activity in the last 329665005 ms
11:35:18.442 WARN Disconnecting client io.vertx.ext.stomp.impl.StompServerWebSocketConnectionImpl@6f5765e1 - no client activity in the last 329664961 ms
11:35:13.486 WARN Disconnecting client io.vertx.ext.stomp.impl.StompServerWebSocketConnectionImpl@6f5765e1 - no client activity in the last 329660005 ms
As you can see this hashCode is the same for all logs.
Logs count(only for this connection):
- last 8 hours: 11,541
- all time: 133,148
Clients use the following heart-beat value: 5000,10000
UPD:
I reproduced this issue -> client sends more than one CONNECT command. A quick solution is a change StompServerTCPConnectionImpl#configureHeartbeat to:
public synchronized void configureHeartbeat(long ping, long pong, Handler<StompServerConnection> pingHandler) {
cancelHeartbeat();
if (ping > 0) {
pinger = server.vertx().setPeriodic(ping, l -> pingHandler.handle(this));
}
if (pong > 0) {
ponger = server.vertx().setPeriodic(pong, l -> {
long delta = System.nanoTime() - lastClientActivity;
final long deltaInMs = TimeUnit.MILLISECONDS.convert(delta, TimeUnit.NANOSECONDS);
if (deltaInMs > pong * 2) {
log.warn("Disconnecting client " + this + " - no client activity in the last " + deltaInMs + " ms");
close();
}
});
}
}
But we should handle this case normally.
Hi, I have an issue with a lot of logs about idle connections on the STOMP server(3.7.1 version) with websocket bridge.
Example from my logs:
As you can see this hashCode is the same for all logs.
Logs count(only for this connection):
Clients use the following heart-beat value:
5000,10000UPD:
I reproduced this issue -> client sends more than one
CONNECTcommand. A quick solution is a changeStompServerTCPConnectionImpl#configureHeartbeatto:But we should handle this case normally.