<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Take a look at you FDs:<div>(linux)</div><div><div># cat /proc/sys/fs/file-nr </div><div>11730<span class="Apple-tab-span" style="white-space:pre"> </span>0<span class="Apple-tab-span" style="white-space:pre"> </span>5049800</div><div><br></div><div>Varnish works with a limit of 65k file descriptors. Anything above that will be a problem.</div><div><br></div><div><a href="http://varnish.projects.linpro.no/changeset/3631">http://varnish.projects.linpro.no/changeset/3631</a></div><div><br></div><div>If you are getting 65k FD`S we hit the same problem.</div><div><br></div><div>Another tip: if you are running on a 32bits system, thats your problem!</div><div><br></div><div>[]s,</div><div><br></div><div><br></div><div><div>On Apr 13, 2009, at 2:57 AM, Ray Barnes wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Sat, Apr 11, 2009 at 5:48 PM, Artur Bergman <span dir="ltr"><<a href="mailto:sky@crucially.net">sky@crucially.net</a>></span> wrote:<br> <blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"> <div style="WORD-WRAP: break-word">I've never seen it do worker threads not created. <div><br></div> <div>Are there any limits on number of threads? </div></div></blockquote> <div> </div> <div>Apparently there are; thanks for pointing me in the right direction. I found a C program that attempts to spawn threads and lets you know at what point it hits an error - <a href="http://people.redhat.com/alikins/tuning_utils/thread-limit.c">http://people.redhat.com/alikins/tuning_utils/thread-limit.c</a> - it reports that I can't open more than 383 threads. The question is why. Here's what I've done thus far:</div> <div> </div> <div>1) Recompiled glibc per <a href="http://people.redhat.com/alikins/system_tuning.html#threads">http://people.redhat.com/alikins/system_tuning.html#threads</a> - the definition of PTHREAD_THREADS_MAX is tied to the value in /usr/include/linux/limits.h so I adjusted that value, installed the source RPM, rebuilt all glibc RPMs and installed using 'rpm -Uvh --force' to overcome pre/post installation errors within the RPM (hopefully that did what it was supposed to).</div> <div> </div> <div>2) Set /proc/sys/kernel/threads-max to 65535 (was 3000ish before), no change</div> <div> </div> <div>3) Set /etc/security/limits.conf to "* soft nofile 1024" and "* hard nofile 10240" and added "session required /lib/security/pam_limits.so" to /etc/pam.d/login with no change, per the advice at <a href="http://www.mail-archive.com/java-linux@java.blackdown.org/msg15247.html">http://www.mail-archive.com/java-linux@java.blackdown.org/msg15247.html</a> where the poster indicates he did not have to recompile glibc to do this</div> <div> </div> <div>I've tried the same C program above on a few other Linux boxes and they all seem to be somewhere between 200 and 383 allowed threads. The first obvious solution would be to dump Linux and use FBSD - a direction i'll look into in the future. But for now we're stuck on Linux. Any ideas?</div> <div> </div> <div>-Ray</div> <div> </div> <div> </div> <div> </div></div><br><div> <br class="webkit-block-placeholder"></div><hr> E-mail verificado pelo Terra Anti-Spam.<br> Para classificar esta mensagem como spam ou não spam, <a href="http://mail.terra.com.br/cgi-bin/reportspam.cgi?+_d=SCY1ODAyNDQ3I3Blcm0hdGVycmEmMSwxMjM5NjAyMjg4LjIxOTU2My4xNTI1Ni5zaW50YWx1dGEudGVycmEuY29tLDgyNTc=TerraMail">clique aqui</a>.<br> Verifique periodicamente a pasta Spam para garantir que apenas mensagens<br> indesejadas sejam classificadas como Spam. <div style="clear: both; "> <br class="webkit-block-placeholder"></div><hr align="left" width="400" size="2"> <font face="trebuchet MS, arial" size="2"> Esta mensagem foi verificada pelo E-mail Protegido Terra.<br> Atualizado em 12/04/2009<br> </font><div><br class="webkit-block-placeholder"></div> _______________________________________________<br>varnish-dev mailing list<br><a href="mailto:varnish-dev@projects.linpro.no">varnish-dev@projects.linpro.no</a><br>http://projects.linpro.no/mailman/listinfo/varnish-dev<br></blockquote></div><br></div></body></html>