Skip to content
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

Improve handling of poolboy timeouts during ping requests #763

Merged
merged 1 commit into from
Jan 3, 2014

Commits on Jan 3, 2014

  1. Improve handling of poolboy timeouts during ping requests

    The design of the riak_cs_wm_ping webmachine resource is that it
    blocks for a timeout period while attempting to checkout a Riak
    connection from the poolboy request_pool. If the timeout expires
    before a pool connection is checked out it is designed to attempt to
    establish a direct connection to Riak and then attempt the ping.
    
    The reality of what occurs is that the process handling the ping request
    crashes after the timeout expires. This is due to the fact that
    poolboy:checkout calls gen_fsm:sync_send_event with a timeout
    parameter specified. The timeout expiration results in a call to
    exit(timeout) that causes the request process to crash and return a
    500 error to the client.
    
    This change modifies the riak_cs_wm_ping resource to catch the exit on
    timeout and return the atom full. This allows the direct connection
    logic to execute and either return success to the user or a 503 error
    indicating the system is too heavily loaded.
    kellymclaughlin committed Jan 3, 2014
    Configuration menu
    Copy the full SHA
    707b15a View commit details
    Browse the repository at this point in the history