-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Socket IO Module - Hanging on Shutdown #211
Comments
@dshurt Pull request welcomed! |
Alright, I'll see what I can do. |
Fix for not releasing resources causing hang
#211 - Socket IO Module - Hanging on Shutdown
Could you tell me more about your case?
I'm not sure what did that mean.At first I think it looks like Atmosphere-extensions for SocketIO cann't running in tomcat,but now it seems like you did it.So I'm looking for some help here,THx |
Sounds like that exception is about websocket support. Tomcat 7+ should have websocket support. However, some older version may have a custom version. (check your tomcat lib dir for websocket-api.jar, and tomcat7-websocket.jar or equivalent) I didn't have issue with websocket with tomcat but I did have issue with long poll (comet) support. My issue, I believed, stems from a library call Stripes framework which has some filters that don't support async calls. This issue however was all about the shutdown of tomcat. The socket io extension opens a thread pool which wasn't shutdown properly. I created a pull request to correct that. I'm currently using this solution. I used the socket io library (0.98 version) on the client for websocket and atmosphere on the server. Keep mind, if your server sits behind a proxy (Eg. Apache, nginx...etc) they must be setup to support websocket or it won't work. In my case, I detect that and fall back to client-side polling since long poll didn't work. Hopefully that's helpful. |
@dshurt Where is your pull request? Do it again and I will merge and release. |
It was merged several months ago. However, I don't know if was released. |
Hi, I was looking into the code and only 'extensions-2.3.x' branch includes these changes but 'extensions-2.4.x' and 'master' don't. Just check out destroy() method of org.atmosphere.socketio.cpr.SocketIOAtmosphereInterceptor on these branches. Is that ok? |
@jcstarna Pull request welcomed :-) |
Environment:
Atmosphere-Runtime 2.3.5
Atmosphere-Socket 2.3.2
running in a webapp on Tomcat 7.55
Issue: On shutdown of Tomcat...Tomcat hangs and never terminates
Cause: (As far as the issue has been traced)
SocketIOSessionManagerImpl used an executor that doesn't get property shutdown. So the heartbeat is preventing shutdown.
Suggested Fix:
Shutdown the executor when the AtmosphereFramework destroys the interceptor.
The text was updated successfully, but these errors were encountered: