diff --git a/extra/travis/test_osx.sh b/extra/travis/test_osx.sh
index cf294b11263a21cac6e8ed369b465ee924732ad2..3603c0d29ca9e4d39ba0ea456f0b02a01801ac6c 100755
--- a/extra/travis/test_osx.sh
+++ b/extra/travis/test_osx.sh
@@ -1 +1,9 @@
+echo "Increase the maximum number of open file descriptors on macOS"
+NOFILE=20480
+sudo sysctl -w kern.maxfiles=$NOFILE
+sudo sysctl -w kern.maxfilesperproc=$NOFILE
+sudo launchctl limit maxfiles $NOFILE $NOFILE
+ulimit -S -n $NOFILE
+ulimit -n
+
 cd test && python test-run.py