From 78203c83f6b30d926ddd99b1efd166dd8aa26822 Mon Sep 17 00:00:00 2001 From: John Matthews Date: Tue, 7 Nov 2023 14:25:11 -0500 Subject: [PATCH] Address too many open files on MacOS Signed-off-by: John Matthews --- hack/darwin_restart_podman_machine.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hack/darwin_restart_podman_machine.sh b/hack/darwin_restart_podman_machine.sh index bb5ef95..4958135 100755 --- a/hack/darwin_restart_podman_machine.sh +++ b/hack/darwin_restart_podman_machine.sh @@ -8,6 +8,7 @@ # See https://github.com/konveyor/kantra/issues/91 # See https://github.com/containers/podman/issues/16106#issuecomment-1317188581 +# Setting file limits to unlimited on the Mac Host ulimit -n unlimited podman machine stop $VM_NAME podman machine rm $VM_NAME -f @@ -15,4 +16,8 @@ podman machine init $VM_NAME -v $HOME:$HOME -v /private/tmp:/private/tmp -v /var podman machine set $VM_NAME --cpus $CPUS --memory $MEM --disk-size $DISK_SIZE podman system connection default $VM_NAME podman machine start $VM_NAME - +# Workaround for setting file limits inside of the podman machine VM +# https://github.com/konveyor/kantra/issues/111 +podman machine ssh $VM_NAME "echo * soft nofile 65535 | sudo tee -a /etc/security/limits.conf" +podman machine ssh $VM_NAME "echo * hard nofile 65535 | sudo tee -a /etc/security/limits.conf" +podman machine ssh $VM_NAME ulimit -n #To confirm the change has taken effect