OpenVZ Forum


Home » General » Support » *SOLVED* Apache2 error: Cannot allocate memory: apr_thread_create: unable to create worker thread
*SOLVED* Apache2 error: Cannot allocate memory: apr_thread_create: unable to create worker thread [message #3267] Fri, 19 May 2006 12:26 Go to next message
nalle is currently offline  nalle
Messages: 3
Registered: May 2006
Junior Member
[Fri May 19 11:24:06 2006] [notice] Apache/2.0.55 (Debian) configured -- resuming normal operations
[Fri May 19 11:24:06 2006] [alert] (12)Cannot allocate memory: apr_thread_create: unable to create worker thread

And then the alerts just keep on coming until either the virtual machine locks up or the server gets and unexpected shutdown.

Also some stuff happens in the meantime:

web:/var/log/apache2# ps aux


Signal 11 (SEGV) caught by ps (procps version 3.2.1).
Please send bug reports to <feedback@lists.sf.net> or <albert@users.sf.net>

and once it told me that no processes had memory left to play with, couldn't even use cd or ls

Anyone have a clue on why this is happening?

[Updated on: Mon, 22 May 2006 09:40] by Moderator

Report message to a moderator

Re: Apache2 error: Cannot allocate memory: apr_thread_create: unable to create worker thread [message #3268 is a reply to message #3267] Fri, 19 May 2006 12:31 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Quote:

[Fri May 19 11:24:06 2006] [notice] Apache/2.0.55 (Debian) configured -- resuming normal operations
[Fri May 19 11:24:06 2006] [alert] (12)Cannot allocate memory: apr_thread_create: unable to create worker thread


please, look at /proc/user_beancounters output.
May be some memory limits are hitted?

Also, please, provide your kernel version.
Re: Apache2 error: Cannot allocate memory: apr_thread_create: unable to create worker thread [message #3269 is a reply to message #3268] Fri, 19 May 2006 12:34 Go to previous messageGo to next message
nalle is currently offline  nalle
Messages: 3
Registered: May 2006
Junior Member
web:~# cat /proc/user_beancounters
Version: 2.5
       uid  resource           held    maxheld    barrier      limit    failcnt
         1: kmemsize         331779     827022    2752512    2936012          0
            lockedpages           0          0         32         32          0
            privvmpages        4052      49146      49152      53575         20
            shmpages            640        992       8192       8192          0
            dummy                 0          0          0          0          0
            numproc               8         40         65         65          0
            physpages           934       1907          0 2147483647          0
            vmguarpages           0          0      32768      32768          0
            oomguarpages        934       1907       6144 2147483647          0
            numtcpsock            2          4         80         80          0
            numflock              2          4        100        110          0
            numpty                1          1         16         16          0
            numsiginfo            0          7        256        256          0
            tcpsndbuf          4440      24420     319488     524288          0
            tcprcvbuf             0       5124     319488     524288          0
            othersockbuf       2220       8880     132096     336896          0
            dgramrcvbuf           0       2220     132096     132096          0
            numothersock          1          9         80         80          0
            dcachesize        46280      69680    1048576    1097728          0
            numfile              98        211       2048       2048          0
            dummy                 0          0          0          0          0
            dummy                 0          0          0          0          0
            dummy                 0          0          0          0          0
            numiptent            10         10        128        128          0


Kernel is 2.6.16-026test012
Re: Apache2 error: Cannot allocate memory: apr_thread_create: unable to create worker thread [message #3270 is a reply to message #3269] Fri, 19 May 2006 12:42 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
 privvmpages        4052      49146      49152      53575         20
20 in last column means, that 20 times privvmpages barrier/limit was hitted. Thus 49152/53575 pages aren't enough for your situatation.

Just increase this limit:
vzctl set 1 --privvmpages 100000 --save
And retry to start apache. After that check /proc/user_beancounters to be sure, that 100000 pages are enough.

Good luck.
Re: Apache2 error: Cannot allocate memory: apr_thread_create: unable to create worker thread [message #3271 is a reply to message #3270] Fri, 19 May 2006 12:45 Go to previous messageGo to next message
nalle is currently offline  nalle
Messages: 3
Registered: May 2006
Junior Member
Thanks that solved it Smile maxheld ended up at 61657 and the errors are gone
Re: *SOLVED* Apache2 error: Cannot allocate memory: apr_thread_create: unable to create worker threa [message #6184 is a reply to message #3267] Mon, 11 September 2006 12:10 Go to previous messageGo to next message
HappyAlex is currently offline  HappyAlex
Messages: 27
Registered: September 2006
Junior Member
I got same problem Sad

Quote:


-bash-3.1# cat /proc/user_beancounters
Version: 2.5
uid resource held maxheld barrier limit failcnt
101: kmemsize 654460 1681938 2060288 2060288 0
lockedpages 0 0 32 32 0
privvmpages 4049 99780 100000 100000 4
shmpages 0 52 8192 8192 0
dummy 0 0 0 0 0
numproc 9 49 5000 5000 0
physpages 1006 2117 0 2147483647 0
vmguarpages 0 0 6144 2147483647 0
oomguarpages 1006 2117 6144 2147483647 0
numtcpsock 1 3 80 80 0
numflock 1 4 100 110 0
numpty 1 1 16 16 0
numsiginfo 0 2 256 256 0
tcpsndbuf 0 0 319488 524288 0
tcprcvbuf 16384 0 4096000 4096000 0
othersockbuf 6708 7408 132096 336896 0
dgramrcvbuf 0 8380 132096 132096 0
numothersock 6 11 80 80 0
dcachesize 0 0 1048576 1097728 0
numfile 219 892 2048 2048 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
numiptent 10 10 128 128 0






[Mon Sep 11 16:12:21 2006] [notice] Apache/2.0.59 (Unix) configured -- resuming normal operations
[Mon Sep 11 16:12:21 2006] [alert] (12)Cannot allocate memory: apr_thread_create: unable to create worker thread
[Mon Sep 11 16:12:21 2006] [alert] (12)Cannot allocate memory: apr_thread_create: unable to create worker thread
[Mon Sep 11 16:12:23 2006] [alert] No active workers found... Apache is exiting!

[Updated on: Mon, 11 September 2006 12:13]

Report message to a moderator

Re: *SOLVED* Apache2 error: Cannot allocate memory: apr_thread_create: unable to create worker threa [message #6185 is a reply to message #6184] Mon, 11 September 2006 12:28 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hi,

then, increase limits, like in this thread! Smile
http://forum.openvz.org/index.php?t=tree&th=607&mid= 3270&&rev=&reveal=
Re: *SOLVED* Apache2 error: Cannot allocate memory: apr_thread_create: unable to create worker threa [message #6186 is a reply to message #3267] Mon, 11 September 2006 13:32 Go to previous messageGo to next message
HappyAlex is currently offline  HappyAlex
Messages: 27
Registered: September 2006
Junior Member
vzctl set 101 --privvmpages 150000 --save
поставил вот так -( результат
апач работает, но при нагрузки на
ls, ps ax выдает cannot allocate memory
Re: *SOLVED* Apache2 error: Cannot allocate memory: apr_thread_create: unable to create worker threa [message #6187 is a reply to message #6186] Mon, 11 September 2006 13:47 Go to previous message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Please, only in English in this forum.

You should check for failcounters in /proc/user_beancounters,
And increase appropriate parameter.
Previous Topic: Install firefox in VE0
Next Topic: Backup / restore /migrate tasks
Goto Forum:
  


Current Time: Mon Nov 04 17:34:33 GMT 2024

Total time taken to generate the page: 0.04510 seconds