Skip to content

Commit 1e7b8c6

Browse files
committed
Set nofile ulimit to 65535 for Docker container
Prevents 'too many open files' (EMFILE) errors under high connection counts. Default Docker ulimit of 1024 is too low for proxy workloads. Fixes #18.
1 parent b2ae6d9 commit 1e7b8c6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

mtproxymax.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2461,6 +2461,7 @@ run_proxy_container() {
24612461
[ -n "${PROXY_MEMORY}" ] && _docker_args+=(--memory "${PROXY_MEMORY}" --memory-swap "${PROXY_MEMORY}")
24622462

24632463
docker run -d "${_docker_args[@]}" \
2464+
--ulimit nofile=65535:65535 \
24642465
-v "${CONFIG_DIR}/config.toml:/etc/telemt.toml:ro" \
24652466
"$(get_docker_image)" /etc/telemt.toml \
24662467
&>/dev/null || {

0 commit comments

Comments
 (0)