diff --git a/jobs/proxy/spec b/jobs/proxy/spec index f04f6c4b..cd4d6854 100644 --- a/jobs/proxy/spec +++ b/jobs/proxy/spec @@ -73,4 +73,6 @@ properties: cf_mysql.proxy.consul_service_name: description: "Switchboard will register with consul using this name" default: "mysql" - + cf_mysql.proxy.max_open_files: + description: 'Configure this number to be twice as large as mysql.max_connections' + default: 3000 diff --git a/jobs/proxy/templates/switchboard_ctl.erb b/jobs/proxy/templates/switchboard_ctl.erb index 0b22ecb5..3e6bf3fa 100644 --- a/jobs/proxy/templates/switchboard_ctl.erb +++ b/jobs/proxy/templates/switchboard_ctl.erb @@ -11,6 +11,8 @@ export PATH=$GOROOT/bin:$PWD/bin:$PATH source /var/vcap/packages/cf-mysql-common/pid_utils.sh +ulimit -n <%= p('cf_mysql.proxy.max_open_files') %> + case $1 in start)