mirror of
https://github.com/redis/redis.git
synced 2026-10-28 08:25:04 +08:00
Test fix "too many open files" on macOS (#14853)
On macOS, running `make test` often fails with "too many open files" due to the low default limit (usually 256). This PR increases the limit by adding `ulimit -n 4096` so that the tests have enough file descriptors for concurrent connections.
This commit is contained in:
1 parent
95040d61d5
commit
457a1a542d
4 files changed
+20
No files matched your search
@@ -1,4 +1,9 @@
|
||||
#!/bin/sh
|
||||
# Raise open files limit (macOS default 256 is too low for tests).
|
||||
OPEN_FILE_LIMIT=$(ulimit -n 2>/dev/null)
|
||||
if [ -n "$OPEN_FILE_LIMIT" ] && [ "$OPEN_FILE_LIMIT" != "unlimited" ] && [ "$OPEN_FILE_LIMIT" -lt 1024 ]; then
|
||||
ulimit -n 1024 2>/dev/null || true
|
||||
fi
|
||||
TCL_VERSIONS="8.5 8.6 8.7 9.0"
|
||||
TCLSH=""
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/sh
|
||||
# Raise open files limit (macOS default 256 is too low for tests).
|
||||
OPEN_FILE_LIMIT=$(ulimit -n 2>/dev/null)
|
||||
if [ -n "$OPEN_FILE_LIMIT" ] && [ "$OPEN_FILE_LIMIT" != "unlimited" ] && [ "$OPEN_FILE_LIMIT" -lt 1024 ]; then
|
||||
ulimit -n 1024 2>/dev/null || true
|
||||
fi
|
||||
TCL_VERSIONS="8.5 8.6 8.7 9.0"
|
||||
TCLSH=""
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/sh
|
||||
# Raise open files limit (macOS default 256 is too low for tests).
|
||||
OPEN_FILE_LIMIT=$(ulimit -n 2>/dev/null)
|
||||
if [ -n "$OPEN_FILE_LIMIT" ] && [ "$OPEN_FILE_LIMIT" != "unlimited" ] && [ "$OPEN_FILE_LIMIT" -lt 1024 ]; then
|
||||
ulimit -n 1024 2>/dev/null || true
|
||||
fi
|
||||
TCL_VERSIONS="8.5 8.6 8.7 9.0"
|
||||
TCLSH=""
|
||||
[ -z "$MAKE" ] && MAKE=make
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/sh
|
||||
# Raise open files limit (macOS default 256 is too low for tests).
|
||||
OPEN_FILE_LIMIT=$(ulimit -n 2>/dev/null)
|
||||
if [ -n "$OPEN_FILE_LIMIT" ] && [ "$OPEN_FILE_LIMIT" != "unlimited" ] && [ "$OPEN_FILE_LIMIT" -lt 1024 ]; then
|
||||
ulimit -n 1024 2>/dev/null || true
|
||||
fi
|
||||
TCL_VERSIONS="8.5 8.6 8.7 9.0"
|
||||
TCLSH=""
|
||||
|
||||
|
||||
Reference in new issue
Block a user