Name: ulimit-release
Owner: Pivotal Cloud Foundry
Description: BOSH Release to increase max open files for co-located jobs
Created: 2017-02-10 18:56:54.0
Updated: 2017-06-28 16:37:58.0
Pushed: 2018-01-16 19:48:36.0
Size: 10
Language: C
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
ulimit
releaseA BOSH release which mimics the function of ulimit
Upload release to director.
Set properties in manifest:
erties:
file:
soft: 16384
hard: 16384
Only works for the ulimit property “open files”.
Creates /etc/security/limits.d/62-ulimit.conf
.
Dynamically adjust monit's “Max open files”.
This runs as a pre-start script.
Fixes: Accept error: accept tcp [::]:80: accept4: too many open files
.
Defaults to 16384/16384 soft/hard limit for all users.
This was tested on Ubuntu and CentOS stemcells.
This release has 2 components:
A pre-start executable (pivotal_prlimit
, a small C program which uses prlimit(2)) which modifies the ulimit of the running monit
process. monit
, as it forks sub-processes (i.e. as it starts jobs), will pass along the updated ulimits (max number of open files). This makes sure the ulimit is set on initial deployment.
A template which creates /etc/security/limits.d/62-ulimit.conf
which sets the ulimit on reboot (pre-start scripts are not run on reboot).