<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">On Fri, Feb 28, 2020 at 11:08 PM Nishant Kumar &lt;<a href="mailto:nishantkumar35@gmail.com">nishantkumar35@gmail.com</a>&gt; wrote:</div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I am using <span style="color:rgb(0,0,0);font-family:Menlo;font-size:9pt">undertow-core (</span><span style="color:rgb(0,0,0);font-family:Menlo;font-size:9pt">2.0.29.Final) </span>with Java 11. Every once in a while (1-2 days) I got  <span style="color:rgb(29,28,29);font-family:Monaco,Menlo,Consolas,&quot;Courier New&quot;,monospace;font-size:12px;font-variant-ligatures:none;white-space:pre-wrap">Too many open files</span> error on my high load server (30k JSON Request/sec) and then it stops responding. I have noticed that it happens during full GC (but not during all full GC). Could you please help me to fix this? </div></div></blockquote><div><br></div><div class="gmail_default" style="font-size:small">The &quot;too many open files&quot; error is invariably related to exceeding the max. open file descriptors as enforced by the OS.  Note that if you&#39;re using systemd to start undertow, then you have to specify LimitNOFILE (it ignores /etc/security/limits*); see [1] for more details.  If you&#39;re not running systemd, then I&#39;d double-check the file descriptor limit for the user running the undertow process.  As to why this happens once in a while, my best guess is either or both (a) there is a sudden, short-lived spike in new connections, (b) many connections are kept alive for over 24 hours. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">We&#39;ve had similar issues while running undertow in high-throughput, low-latency environment (in front of GLB).  Even with the unreasonably high file descriptor limit (LimitNOFILE=795588), we&#39;ve seen traffic bursts that would bring down undertow by triggering (linux) OOM killer (with that many connections, non-heap memory is exhausted).</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">[1] <a href="https://serverfault.com/questions/628610/increasing-nproc-for-processes-launched-by-systemd-on-centos-7">https://serverfault.com/questions/628610/increasing-nproc-for-processes-launched-by-systemd-on-centos-7</a></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Best,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">stan</div></div></div>