Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-nodejs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-nodejs
Commits
b9827816
Commit
b9827816
authored
Sep 12, 2017
by
Troels Thomsen
Committed by
Jeremy Morrell
Oct 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Read memory limit
parent
b119743b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
WEB_CONCURRENCY.sh
profile/WEB_CONCURRENCY.sh
+5
-8
No files found.
profile/WEB_CONCURRENCY.sh
View file @
b9827816
...
...
@@ -15,15 +15,12 @@ log_concurrency() {
detect_memory
()
{
local
default
=
$1
local
limit
=
$(
ulimit
-u
)
case
$limit
in
256
)
echo
"512"
;;
# Standard-1X
512
)
echo
"1024"
;;
# Standard-2X
16384
)
echo
"2560"
;;
# Performance-M
32768
)
echo
"14336"
;;
# Performance-L
*
)
echo
"
$default
"
;;
esac
if
[
-e
/sys/fs/cgroup/memory/memory.limit_in_bytes
]
;
then
expr
"
$(
cat
/sys/fs/cgroup/memory/memory.limit_in_bytes
)
"
/ 1048576
else
echo
"
$default
"
fi
}
export
MEMORY_AVAILABLE
=
${
MEMORY_AVAILABLE
-
$(
detect_memory 512
)}
...
...
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