Skip to content

Check if port/socket is available before forking in Streaming API#9023

Merged
Gargron merged 1 commit intomasterfrom
feature-streaming-fail-fast
Oct 20, 2018
Merged

Check if port/socket is available before forking in Streaming API#9023
Gargron merged 1 commit intomasterfrom
feature-streaming-fail-fast

Conversation

@Gargron
Copy link
Copy Markdown
Member

@Gargron Gargron commented Oct 19, 2018

Previously, the server would attempt taking port/socket in worker process, and if it was taken, fail, which made the master process create a new worker. This led to really high CPU usage if the
streaming API was started when the port or socket were not available.

Now, before clustering (forking) into worker processes, a test server is created and then removed to check if it can be done.

Resolve #8978

Previously, the server would attempt taking port/socket in worker
process, and if it was taken, fail, which made the master process
create a new worker. This led to really high CPU usage if the
streaming API was started when the port or socket were not
available.

Now, before clustering (forking) into worker processes, a test
server is created and then removed to check if it can be done.
@Gargron Gargron added the deployment Related to runtime configuration, production setups label Oct 19, 2018
@Gargron Gargron merged commit 369cc5f into master Oct 20, 2018
@Gargron Gargron deleted the feature-streaming-fail-fast branch October 20, 2018 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deployment Related to runtime configuration, production setups

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants