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
ec1e931e
Commit
ec1e931e
authored
Nov 15, 2019
by
Matthias Kaeppler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Grow Redis conn pool size with Puma thread count
parent
037db4be
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
config/application.rb
config/application.rb
+2
-2
lib/gitlab/redis/wrapper.rb
lib/gitlab/redis/wrapper.rb
+2
-0
No files found.
config/application.rb
View file @
ec1e931e
...
...
@@ -255,8 +255,8 @@ module Gitlab
caching_config_hash
[
:compress
]
=
false
caching_config_hash
[
:namespace
]
=
Gitlab
::
Redis
::
Cache
::
CACHE_NAMESPACE
caching_config_hash
[
:expires_in
]
=
2
.
weeks
# Cache should not grow forever
if
Sidekiq
.
server?
# threaded context
caching_config_hash
[
:pool_size
]
=
Sidekiq
.
options
[
:concurrency
]
+
5
if
Sidekiq
.
server?
||
defined?
(
::
Puma
)
# threaded context
caching_config_hash
[
:pool_size
]
=
Gitlab
::
Redis
::
Cache
.
pool_size
caching_config_hash
[
:pool_timeout
]
=
1
end
...
...
lib/gitlab/redis/wrapper.rb
View file @
ec1e931e
...
...
@@ -25,6 +25,8 @@ module Gitlab
if
Sidekiq
.
server?
# the pool will be used in a multi-threaded context
size
+=
Sidekiq
.
options
[
:concurrency
]
elsif
defined?
(
::
Puma
)
size
+=
Puma
.
cli_config
.
options
[
:max_threads
]
end
size
...
...
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