[Varnish] #572: Fix for: Create worker thread failed 11 Resource temporarily unavailable (Thread Problem on Linux)

Varnish varnish-bugs at projects.linpro.no
Tue Nov 3 09:10:34 CET 2009


#572: Fix for: Create worker thread failed 11 Resource temporarily unavailable
(Thread Problem on Linux)
-------------------------+--------------------------------------------------
 Reporter:  whocares     |        Owner:  phk  
     Type:  enhancement  |       Status:  new  
 Priority:  normal       |    Milestone:       
Component:  varnishd     |      Version:  trunk
 Severity:  normal       |   Resolution:       
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by tfheen):

 Replying to [ticket:572 whocares]:

 > Today I tried kristian's [wiki:Performance] tips on a Linux box and
 > ran into the same problem as was already mentioned in #85: Depending
 > on what box I tried, I never managed to get more than 238 to 302
 > threads.

 This is because you're on a 32 bit platform, not intrinsically because
 of the stack size.  The easy fix is just to upgrade to a 64 bit host.

 > On Linux this will set the stack size to 16384 bytes which of course
 > is way too small, but allows for around 32.000 threads to be created
 > on my test box.

 The reason you can't have more is that you run out of pids.  There are
 only 32k of those.  (I can create 32k-ish threads on my laptop with
 8MB stack size just fine.)

 as kb noted in another report, -s is a workaround for this (even if I
 understand this isn't an option for you in this case).

 I'll leave this bug open so we can take a look at it and decide if we
 want to add such an option or not.

-- 
Ticket URL: <http://varnish.projects.linpro.no/ticket/572#comment:3>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator


More information about the varnish-bugs mailing list