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

Fix hanging consoles: Close other client sockets in spring application forks #647

Merged
merged 1 commit into from
Nov 23, 2021

Commits on Jun 15, 2021

  1. Close other client sockets in application forks

    All client unix sockets are initiated at the spring application
    process before forking to serve each client. A reference to the
    client socket remains active by the thread in the wait method waiting
    for the client's fork to exit.
    
    This is problematic in cases with more than one parallel clients
    because the client socket for the first client is also present in
    the fork for the second client due to fd inheritance from the spring
    application parent process.
    
    With the first client's socket being present in the second client's
    fork, the first client cannot exit gracefully because a reference to
    its socket remains open in the fork for the second client leading to
    rails console hanging for the first client until the second client
    gets terminated.
    
    The problem can be reproduced by opening 2 rails consoles on spring
    & attempting to exit the first console while the second is still active.
    charkost committed Jun 15, 2021
    Configuration menu
    Copy the full SHA
    1c15dcd View commit details
    Browse the repository at this point in the history