]> cat aescling's git repositories - mastodon.git/commit
Check if port/socket is available before forking in Streaming API (#9023)
authorEugen Rochko <eugen@zeonfederated.com>
Sat, 20 Oct 2018 00:25:25 +0000 (02:25 +0200)
committerGitHub <noreply@github.com>
Sat, 20 Oct 2018 00:25:25 +0000 (02:25 +0200)
commit369cc5f555821d823d4daf7aab3142cdac896a69
tree5f5d4f4e5fe76fd6d82d81e83a8de82df757e765
parenteb1b9903a6f60d024d71bffd635e6fec7edc59a9
Check if port/socket is available before forking in Streaming API (#9023)

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.
streaming/index.js