Sha256: 3722534b40256c3a0aa32edcc7ac3b74e5859ad95aef0c612bafb85a0b95a8f8

Contents?: true

Size: 524 Bytes

Versions: 55

Compression:

Stored size: 524 Bytes

Contents

require "redis"

worker_processes 3

# If you set the connection to Redis *before* forking,
# you will cause forks to share a file descriptor.
#
# This causes a concurrency problem by which one fork
# can read or write to the socket while others are
# performing other operations.
#
# Most likely you'll be getting ProtocolError exceptions
# mentioning a wrong initial byte in the reply.
#
# Thus we need to connect to Redis after forking the
# worker processes.

after_fork do |server, worker|
  $redis = Redis.connect
end

Version data entries

55 entries across 55 versions & 7 rubygems

Version Path
abaci-0.3.0 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.7.5 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.7.4 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.7.3 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.7.2 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.7.1 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.7.0 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.6.9 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.6.8 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.6.7 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.6.6 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.6.5 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.6.4 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.6.3 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.6.2 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.6.1 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.6.0 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.5.17 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.5.16 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.5.15 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb