sinatra/sinatra-recipes — pull request #22 by jeremyevans (2011-12-09 21:20:38+00:00)
Title: 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.