BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
21fab4f4
Commit
21fab4f4
authored
Jan 20, 2016
by
Yorick Peterse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use env variables for Unicorn memory limits
This makes it easier for users to use their own limits based on their server configuration.
parent
481644ca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
config.ru
config.ru
+4
-1
environment_variables.md
doc/administration/environment_variables.md
+2
-0
No files found.
config.ru
View file @
21fab4f4
...
...
@@ -7,8 +7,11 @@ if defined?(Unicorn)
# Unicorn self-process killer
require
'unicorn/worker_killer'
min
=
(
ENV
[
'GITLAB_UNICORN_MEMORY_MIN'
]
||
200
*
1
<<
20
).
to_i
max
=
(
ENV
[
'GITLAB_UNICORN_MEMORY_MAX'
]
||
250
*
1
<<
20
).
to_i
# Max memory size (RSS) per worker
use
Unicorn
::
WorkerKiller
::
Oom
,
(
200
*
(
1
<<
20
)),
(
250
*
(
1
<<
20
))
use
Unicorn
::
WorkerKiller
::
Oom
,
min
,
max
end
end
...
...
doc/administration/environment_variables.md
View file @
21fab4f4
...
...
@@ -17,6 +17,8 @@ DATABASE_URL | url | For example: postgresql://localhost/blog_development?pool=5
GITLAB_EMAIL_FROM | email | Email address used in the "From" field in mails sent by GitLab
GITLAB_EMAIL_DISPLAY_NAME | string | Name used in the "From" field in mails sent by GitLab
GITLAB_EMAIL_REPLY_TO | email | Email address used in the "Reply-To" field in mails sent by GitLab
GITLAB_UNICORN_MEMORY_MIN | integer | The minimum memory threshold (in bytes) for the Unicorn worker killer
GITLAB_UNICORN_MEMORY_MAX | integer | The maximum memory threshold (in bytes) for the Unicorn worker killer
## Complete database variables
...
...
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