You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue got our intention, while we found our tomcat access logs, flooded with millions of atmosphere hardbeats, which came in approximately every millisecond and filled up the log files within a week to 20GB.
After some research, we could reproduce this issue by restarting our tomcat application server while having a open atmosphere client session. In this case, after the server is back online, the client session seems to try to reconnect to the server and never stops contacting it, until the browser is closed.
In a normal case the atmosphere request is started after user login and operating on a authenticated session, but after restarting the server this session is gone and that's why the reconnects ( or hardbeats, not sure how to call them) are hitting our authentication filter which redirects them to a login page while the session is not valid anymore.
I tried to catch this by implementing a redirect handler within the gwt atmosphere client module and checking on reconnect if this session is still valid. While it's not I just call atmosphere.unsubscribe(), which in my opinion should close the client session, but it seems to lead to an endless try to reconnect or error handling behavior I could not figure out what exactly was producing this flood of messages/hardbeats...
final Atmosphere atmosphere = Atmosphere.create();
config.setReconnectHandler(new AtmosphereReconnectHandler() {
@Override
public void onReconnect(RequestConfig request, AtmosphereResponse response) {
if ( !securityContext.isAuthenticated()){
atmosphere.unsubscribe();
}
}
});
We would be glad for any help.
Thank
Thomas
The text was updated successfully, but these errors were encountered:
While researching for the root cause of this issue I updated atmosphere from 2.2.3 to 2.4.21 thats why the logs differ from the setup description. But same issue for the newer atmosphere version.
current setup spring application:
This issue got our intention, while we found our tomcat access logs, flooded with millions of atmosphere hardbeats, which came in approximately every millisecond and filled up the log files within a week to 20GB.
After some research, we could reproduce this issue by restarting our tomcat application server while having a open atmosphere client session. In this case, after the server is back online, the client session seems to try to reconnect to the server and never stops contacting it, until the browser is closed.
In a normal case the atmosphere request is started after user login and operating on a authenticated session, but after restarting the server this session is gone and that's why the reconnects ( or hardbeats, not sure how to call them) are hitting our authentication filter which redirects them to a login page while the session is not valid anymore.
I tried to catch this by implementing a redirect handler within the gwt atmosphere client module and checking on reconnect if this session is still valid. While it's not I just call atmosphere.unsubscribe(), which in my opinion should close the client session, but it seems to lead to an endless try to reconnect or error handling behavior I could not figure out what exactly was producing this flood of messages/hardbeats...
We would be glad for any help.
Thank
Thomas
The text was updated successfully, but these errors were encountered: