diff --git a/Changelog.md b/Changelog.md index fcee59373dfa35e4c71f0aa69d0cd6b32abc1fc7..a98146806bcd3162c7f1b0bce586c7e3942c9ab6 100644 --- a/Changelog.md +++ b/Changelog.md @@ -10,6 +10,7 @@ ## Features * Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252) * Show the user if a contact is sharing with them when viewing their profile page [#2948](https://github.com/diaspora/diaspora/issues/2948) +* Made Unicorn timeout configurable and increased the default to 90 seconds # 0.1.1.0 diff --git a/config/defaults.yml b/config/defaults.yml index d5fa2bf7e62e9c76f6ac2cc468f3df8fd931b8d7..e9f56a4da654c363719adf2ed5c07fff1b2cec29 100644 --- a/config/defaults.yml +++ b/config/defaults.yml @@ -38,6 +38,7 @@ defaults: stdout_log: database: 'mysql' unicorn_worker: 2 + unicorn_timeout: 90 embed_sidekiq_worker: false sidekiq_workers: 1 privacy: diff --git a/config/diaspora.yml.example b/config/diaspora.yml.example index 5dc0b94f0f50457387d26ad35ff2d92c7efd3df6..1b681ad0e605d066d0e47be4c07ad91121a777ef 100644 --- a/config/diaspora.yml.example +++ b/config/diaspora.yml.example @@ -152,6 +152,12 @@ configuration: ## Section ## Number of Unicorn worker processes, increase this if ## you have many users #unicorn_worker: 2 + + ## Number of seconds before a request is aborted, increase if + ## you get empty responses, or large image uploads fail. + ## Decrease if you're under heavy load and don't care for some + ## requests to fail. + #unicorn_timeout: 90 ## Embed a Sidekiq worker inside the unicorn process, useful for ## minimal Heroku setups diff --git a/config/unicorn.rb b/config/unicorn.rb index 2e55289781d20fc9697ccffb7d1107ca92a52f88..e02a9dcc0c1c736e9753ac85cd79b367c5a9395f 100644 --- a/config/unicorn.rb +++ b/config/unicorn.rb @@ -10,7 +10,7 @@ worker_processes AppConfig.server.unicorn_worker.to_i preload_app true # How long to wait before killing an unresponsive worker -timeout 30 +timeout AppConfig.server.unicorn_timeout.to_i @sidekiq_pid = nil