Skip to content
This repository
Browse code

Remove preload_app config line from example unicorn config

Without a before_fork config block that disconnects the database connection,
this example code breaks when using ActiveRecord, Sequel, and possibly other
database libraries.  Many people copy this config without thinking about it
and report problems to unicorn or sequel due to this.

Further changes could be considered, such as only using multiple processes,
writing a pid file, and redirecting IO if you are daemonizing (check with
Unicorn::Configurator::RACKUP[:daemonize]).  Also, you are using a unix
socket in your configs, and providing a IP socket in your command line
example (-l  One or the other should probably be used
consistently, most likely dropping the -l option from the command line.
  • Loading branch information...
commit 996c5c07b137db8fc78474a1fd9f99107e498214 1 parent 7d12b57
Jeremy Evans authored

Showing 1 changed file with 0 additions and 2 deletions. Show diff stats Hide diff stats

  1. 2  deployment/
2  deployment/
Source Rendered
@@ -73,8 +73,6 @@ Once those are in place, we're ready to setup our `unicorn.rb` configuration.
73 73
     worker_processes 2
74 74
     working_directory @dir
75 75
-    preload_app true
78 76
     timeout 30
79 77
80 78
     # Specify path to socket unicorn listens to, 

0 notes on commit 996c5c0

Please sign in to comment.
Something went wrong with that request. Please try again.