Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Remove preload_app config line from example unicorn config #22

Merged
merged 1 commit into from

2 participants

@jeremyevans

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.

@jeremyevans jeremyevans 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.
996c5c0
@burningTyger burningTyger merged commit 0680c15 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 9, 2011
  1. @jeremyevans

    Remove preload_app config line from example unicorn config

    jeremyevans authored
    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.
This page is out of date. Refresh to see the latest.
Showing with 0 additions and 2 deletions.
  1. +0 −2  deployment/nginx_proxied_to_unicorn.md
View
2  deployment/nginx_proxied_to_unicorn.md
@@ -73,8 +73,6 @@ Once those are in place, we're ready to setup our `unicorn.rb` configuration.
worker_processes 2
working_directory @dir
- preload_app true
-
timeout 30
# Specify path to socket unicorn listens to,
Something went wrong with that request. Please try again.