Skip to content

Commit

Permalink
Merge pull request #601 from sorentwo/friendly-umask
Browse files Browse the repository at this point in the history
Change umask examples to more permissive values
  • Loading branch information
evanphx committed Nov 24, 2014
2 parents 9e2567a + 6258581 commit 68782a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ If you're preloading your application and using ActiveRecord, it's recommend you
ActiveRecord::Base.establish_connection
end
end

When you use preload_app, your new code goes all in the master process, and is then copied in the workers (meaning it’s only compatible with cluster mode). General rule is to use preload_app when your workers die often and need fast starts. If you don’t have many workers, you probably should not use preload_app.

Note that preload_app can’t be used with phased restart, since phased restart kills and restarts workers one-by-one, and preload_app is all about copying the code of master into the workers.
Expand All @@ -133,7 +133,7 @@ Want to use UNIX Sockets instead of TCP (which can provide a 5-10% performance b

If you need to change the permissions of the UNIX socket, just add a umask parameter:

$ puma -b 'unix:///var/run/puma.sock?umask=0777'
$ puma -b 'unix:///var/run/puma.sock?umask=0111'

Need a bit of security? Use SSL sockets!

Expand Down
2 changes: 1 addition & 1 deletion examples/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
#
# bind 'tcp://0.0.0.0:9292'
# bind 'unix:///var/run/puma.sock'
# bind 'unix:///var/run/puma.sock?umask=0777'
# bind 'unix:///var/run/puma.sock?umask=0111'
# bind 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert'

# Instead of “bind 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert'” you
Expand Down

0 comments on commit 68782a4

Please sign in to comment.