-
Notifications
You must be signed in to change notification settings - Fork 17
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
Block during write causing Celluloid IO to crash #22
Comments
There's enough info in the celluloid-io issue that I should be able to throw together something to replicate the issue you're encountering pretty easily. Will throw updates in here once I'm reliably reproducing the behavior. |
and thanks for the report! |
I'm not entirely sure I would recommend this for anyone else, but we're working around the problem thusly: https://github.com/crashlytics/krakow/pull/2 I'm not sure that I'm able to fix the root problem in Celluloid IO. |
This actually has a knock-on effect: because Krakow didn't get to write the entire message when the This manifested for us as JSON parse errors due to inexplicable "PUB \n" in the middle of our messages. Unless you go for the jank workaround I posted above, Krakow may want to have additional exceptions (at least |
Alright, I have a nice changeset shoved into |
Thanks for being so responsive about this. Taking a look. |
Released: https://github.com/chrisroberts/krakow/tree/v0.4.0 Thanks for the report! |
I filed this issue over at Celluloid IO, but it came up in Krakow so I wanted to raise it here in case a workaround is in order: celluloid/celluloid-io#132
The summary is that Celluloid IO crashes if the same actor is blocking on both reads and writes simultaneously. Because of Krakow's read loop, it is basically always blocking on reads. It can end up blocking on writes as well due to slow network + especially large message, which is how we're seeing it in production.
Not sure if there's a fix outside of Celluloid besides somehow refactoring the Krakow Producer into more actors, or hacking around Celluloid IO to do direct synchronous writes to the socket, sidestepping the problematic code.
The text was updated successfully, but these errors were encountered: