Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
dae56806
Commit
dae56806
authored
Dec 27, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2386 from cvut/fix-passenger
Fix shared Redis connection issue on Passenger
parents
c4536ae5
a1434ff5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
config/initializers/passenger_fix.rb
config/initializers/passenger_fix.rb
+16
-0
No files found.
config/initializers/passenger_fix.rb
0 → 100644
View file @
dae56806
if
defined?
(
PhusionPassenger
)
# When you're using Passenger with smart-lv2 (default) or smart spawn method,
# Resque doesn't recognize that it has been forked and should re-establish
# Redis connection. You can see this error message in log:
# Redis::InheritedError, Tried to use a connection from a child process
# without reconnecting. You need to reconnect to Redis after forking.
#
# This solution is based on
# https://github.com/redis/redis-rb/wiki/redis-rb-on-Phusion-Passenger
#
PhusionPassenger
.
on_event
(
:starting_worker_process
)
do
|
forked
|
# if we're in smart spawning mode, reconnect to Redis
Resque
.
redis
.
client
.
reconnect
if
forked
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment