Mailing List Archive

Create worker thread failed 12 Cannot allocate memory
This message i receive when my varnish run. I have 6 GB of RAM but when i run varnish 5 GB are free ... the 1 GB is for somethink another ...not for varnish....so what can i do to tell varnish using RAM ??
Create worker thread failed 12 Cannot allocate memory [ In reply to ]
rad_kam at tlen.pl writes:
> This message i receive when my varnish run. I have 6 GB of RAM but
> when i run varnish 5 GB are free ... the 1 GB is for somethink another
> ...not for varnish....so what can i do to tell varnish using RAM ??

You are most likely running out of address space. What platform are you
on?

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Create worker thread failed 12 Cannot allocate memory [ In reply to ]
rad_kam at tlen.pl writes:
> i686 GNU/Linux....

The i386 has a 4 GB address space, 1 GB of which is normally reserved
for the kernel, leaving 3 GB for applications (or even less depending on
the data segment size limit, 'ulimit -d'). A big chunk of that goes to
the program text (including libraries) and bss, and the stacks (one for
each thread). The cache file can be up to 2 GB (Varnish will refuse to
use more than that on a 32-bit system), and malloc gets whatever is
left, which probably isn't enough if you use a large cache file.

> i have also set the ulimit value as 500000...

*which* ulimit value?

> and worker proces 2048 but still the same error

Increasing the number of worker threads will only make things worse.
You should decrease it to the expected number of concurrent clients.

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Create worker thread failed 12 Cannot allocate memory [ In reply to ]
rad_kam at tlen.pl wrote:
> i686 GNU/Linux....i have also set the ulimit value as 500000...and worker proces 2048 but still the same error
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-misc
>
Correct me if Im wrong - but is it possible to address more than 4GB of
RAM with a 32bit linux kernel ?
Create worker thread failed 12 Cannot allocate memory [ In reply to ]
"ADOFMS Admin, SteveOC" <admin at adofms.com.au> writes:
> Correct me if Im wrong - but is it possible to address more than 4GB of
> RAM with a 32bit linux kernel ?

Provided your kernel was built with PAE support, yes, but the process
address space is still limited to 3 GB.

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Create worker thread failed 12 Cannot allocate memory [ In reply to ]
rad_kam at tlen.pl writes:
> ulimit -n 50000 :)

Where is the logic in this? You run out of address space, and respond
by increasing the number of file descriptors?

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Create worker thread failed 12 Cannot allocate memory [ In reply to ]
rad_kam at tlen.pl writes:
> i don't know if it's logic...i just try everythink ... is there any
> possibility to cache object in RAM ?

Varnish caches objects in virtual memory, and leaves it up to the kernel
to decide whether this means RAM or swap.

> If not then can you tell waht should i do remove this error ...

Increase the data size limit
Reduce the number of worker threads
Reduce the size of the cache file
Switch to a 64-bit machine

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Create worker thread failed 12 Cannot allocate memory [ In reply to ]
rad_kam at tlen.pl writes:
> maybe can i decrease value of workers and increase value of child
> process...

I don't know what you mean by "increase value of child process".

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no