Re: Having problems starting ~10k worker threads in apache
Tom Sightler <ttsig-mn7Ydl480yfqlBn2x/[email protected]> Wed, 19 Sep 2007 10:23:09 -0400
| Newsgroups | gmane.linux.redhat.release.taroon.general |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 2007-09-18 at 11:34 -0400, Ijaaz A. Ullah wrote: > I'm trying to create an instance of apache that spawns ~10k worker > threads. Due to design requirements, I can only use RHEL3 for this > application. > > Here is the contents of my <IfModule worker.c> > > <IfModule worker.c> > ThreadLimit 400 > ServerLimit 32 > StartServers 32 > MaxClients 12800 > MinSpareThreads 12600 > MaxSpareThreads 12800 > ThreadsPerChild 400 > MaxRequestsPerChild 0 > </IfModule> > > > No matter what combination I use, I can not go higher than about 7k. > Anything past that gives me these errors: > > > [Tue Sep 18 15:07:36 2007] [alert] (12)Cannot allocate memory: > apr_thread_create: unable to create worker thread > [Tue Sep 18 15:07:37 2007] [alert] (12)Cannot allocate memory: > apr_thread_create: unable to create worker thread > > Any help would be appreciated. Perhaps a silly questions, but have you increased "threads-max" in /proc/sys/kernel? It seems like the older RHEL3 systems defaulted to around 8k threads system wide, which somewhat matches with your observations. A command something like the following should work: sysctl -w kernel.threads-max=15000 If that works for you just add the parameter to your /etc/sysctl.conf file and you'll be good on future reboots. Later, Tom -- Taroon-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/taroon-list