Reputation: 21
I currently have 114 .Net Core 2.2 API containers running on an Ubuntu 20.04 server. When I add a new container, the container immediately shuts down with Exit Code 0 and no messages to stdout. If I stop a previously running container, the new container works but the one I stopped will not restart - same Exit Code 0 and no messages to stdout. Basically, all of the containers work but only 114 at a time.
For the time being, I've chosen one of the "less critical" containers to experiment with.
What I've tried:
I've added a Console.Writeline as the first line of Main in Program.cs and changed the ENTRYPOINT to /bin/bash and tried running the "dotnet" command manually. After a few seconds it just returns to the command prompt with no output (the Writeline never gets executed).
I've used docker inspect to examine the container after it stops and it doesn't appear to be OOMKilled.
I've used docker logs to display the log but it shows nothing.
I've also increased the fs.inotify.max_user_watches from 8192 to 16384 with no change.
Memory or CPU doesn't seem to be an issue:
Here is my docker info
Any suggestions would be appreciated.
Upvotes: 0
Views: 143
Reputation: 21
Thanks to @omajid's comment I was finally able to get at least some kind of error returned.
The error was: "The configured user limit (128) on the number of inotify instances has been reached".
The fix was to increase the number of max_user_instances by executing:
sudo sysctl fs.inotify.max_user_instances=256
Upvotes: 0