[Fix #3228] idle-timeout not working in cluster mode (#3235)#7
Open
MitchLewis930 wants to merge 1 commit intopr_057_beforefrom
Open
[Fix #3228] idle-timeout not working in cluster mode (#3235)#7MitchLewis930 wants to merge 1 commit intopr_057_beforefrom
idle-timeout not working in cluster mode (#3235)#7MitchLewis930 wants to merge 1 commit intopr_057_beforefrom
Conversation
Greptile OverviewGreptile SummaryFixed Key changes:
How it works: Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Master as Master Process
participant Worker as Worker Process
participant Server as Puma::Server
participant IOSelect as IO.select
Note over Master,Server: Cluster Mode with idle_timeout configured
Master->>Worker: Spawn worker process
Worker->>Server: start_server()
Server->>Server: @idle_timeout_reached = false
Worker->>Server: server.run()
Server->>IOSelect: IO.select(sockets, nil, nil, @idle_timeout)
alt No new connections within timeout
IOSelect-->>Server: nil (timeout reached)
Server->>Server: @idle_timeout_reached = true
Server->>Server: @status = :stop
Server-->>Worker: server_thread.join completes
Worker->>Worker: Check server.idle_timeout_reached
alt idle_timeout_reached is true
Worker->>Master: Process.kill("SIGTERM", master)
Note over Master: Master receives SIGTERM and shuts down
end
else New connection received
IOSelect-->>Server: [sockets] (connection ready)
Server->>Server: Accept and process connection
Note over Server: Continue running normally
end
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR_057