![]() ![]() ![]() # preload_app ! # Allow puma to be restarted by `rails restart` command. This takes advantage of Copy On Write # process behavior so workers use less memory. # This directive tells Puma to first boot the application and load code # before forking the application. fetch ( "RAILS_MAX_THREADS" ) # Use the `preload_app!` method when specifying a `workers` number. ![]() Default is set to 5 threads for minimum # and maximum this matches the default thread size of Active Record. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. # The `threads` method setting takes two numbers: a minimum and maximum. # Puma can serve each request in a thread from an internal thread pool. Modify it to gather the database configuration from the DATABASE_URL environment variable: Open config/database.yml and find the production section. # For details on connection pooling, see Rails configuration guide # pool : development : # production : īefore deploying any serious application in production, some minor tweaks are required. # Configure Using Gemfile # gem 'pg' # default : &default adapter : postgresql encoding : unicode # Install PostgreSQL and put its /bin directory on your path. # Install the pg driver: # gem install pg # On macOS with Homebrew: # gem install pg -with-pg-config=/usr/local/bin/pg_config # On macOS with MacPorts: # gem install pg -with-pg-config=/opt/local/lib/postgresql84/bin/pg_config # On Windows: # gem install pg # Choose the win32 build. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |