Fix hung passenger processes #66

Merged
merged 1 commit into from Aug 24, 2011

Projects

None yet

2 participants

@cgriego

We had a situation where, from the minute we rolled out Vanity we had passenger processes getting hung. 3 workers per server would be serving requests but the rest would be hung in Sessions: 1 Processed: 0. It took us a long while to track down, but we eventually traced it to the Passenger fork hook callback down to the redis adapter disconnect call calling into the redis client gem calling quit. The server would never respond, the call would never timeout, and the process hung until it received a some sort of unix signal.

Redis#quit is a polite exit, it writes to the server to let it know it is going to close the connection after the last message, but when dealing with forking servers you need a more direct disconnect since the current process no longer controls that connection.

Details of the setup: Rails 2.3.12, Passenger 3.0.8, Ruby Enterprise Edition 2011.03.

@cgriego cgriego Redis#quit is a polite exit, letting the server know, but when dealin…
…g with forking servers you need a more direct disconnect else the ruby process can hang.
2c040a9
@assaf assaf merged commit 95ac697 into assaf:master Aug 24, 2011
@assaf
Owner

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment