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
classiccms-0.5.14 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.5.13 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.5.12 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.5.11 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.5.10 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.5.9 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.5.8 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.5.7 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.5.6 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.5.5 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.5.2 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.5.1 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.5.0 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.4.2 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.4.1 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.4.0 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.3.9 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.3.8 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.3.7 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb
classiccms-0.3.6 vendor/bundle/gems/redis-2.2.2/examples/unicorn/unicorn.rb