diff --git a/Changelog.md b/Changelog.md index fcee59373..a98146806 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 d5fa2bf7e..e9f56a4da 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 5dc0b94f0..1b681ad0e 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 2e5528978..e02a9dcc0 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