Remove preload_app config line from example unicorn config #22

Merged
merged 1 commit into from Dec 9, 2011

Conversation

Projects
None yet
2 participants

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 0.0.0.0:3001). One or the other should probably be used
consistently, most likely dropping the -l option from the command line.

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 0.0.0.0:3001).  One or the other should probably be used
consistently, most likely dropping the -l option from the command line.

burningTyger added a commit that referenced this pull request Dec 9, 2011

Merge pull request #22 from jeremyevans/patch-1
Remove preload_app config line from example unicorn config

@burningTyger burningTyger merged commit 0680c15 into sinatra:master Dec 9, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment