I’m trying to test a server with a lot of web sockets and I’m getting the error “Ranch acceptor reducing accept rate: out of file descriptors”
I’ve been trying to set ulimit -n ###### in various ways, but I see ulimit: open files: cannot modify limit: Operation not permitted in the logs. Is there an official way to set the file descriptor limit in a fly.io container?
rel-overlays-bin-server is rel/overlays/bin/server (can’t have slashes in gist filenames)
I think it’s all the defaults generated for a fly.io Elixir app except for the addition of the ENTRYPOINT script and the adding of the ulimit to the server and migrate files.
It seems like this is probably due to USER nobody which is unlikely to have access to operate ulimit.
A quick fix would be to comment out the USER nobody line which should get you running as root at the time of entrypoint. Worth trying that out to see if it works for you.
root is slightly less problematic since these are VMs rather than containers, though not ideal.
If you wanted your process not running under root you could su nobody in the entrypoint. This isn’t perfect. If you did that you might need to create a user called nobody since USER nobody usually does that creation for you I believe.