[plug] Gah! Apache/Perl/Resource malloc problems

Trevor Phillips T.Phillips at murdoch.edu.au
Tue Jan 6 11:11:30 WST 2004


On Tuesday 06 January 2004 10:40, Trevor Phillips wrote:
> This is a long shot, but does any PLUGger have any ideas as to why the
> Apache::Resource module, configured to stop large apache processes, should
> be giving the following error on every web request:
>    Ouch!  malloc failed in malloc_block()

A bit more info... It DOES seem to work, IF I increase the values I'm setting 
for PERL_RLIMIT_AS. However, the docs imply this takes values in Megs 
(actually, the docs say it's NOT in Megs, but in "their natural unit" 
whatever tha means - but the example is in Megs). I've set it to twice the 
size of my Apache processes, but it's killing them all per request.

At the moment, I'm setting it to PERL_RLIMIT_AS = 120:140. It now seems to 
kill runaway processes at about 50Meg in size - but I have no idea if 
RLIMIT_AS is in some weird units (natural or not), or if there's an overhead 
I have to add beyond the normal process size to calculate this value.

BTW: RLIMIT_AS is "Address Space", and the docs say to use it for Linux, since 
Linux doesn't support RLIMIT_DATA...

Can anyone explain?

-- 
. Trevor Phillips             -           http://jurai.murdoch.edu.au/ . 
: Web Technical Administrator     -          T.Phillips at murdoch.edu.au : 
| IT Services                        -              Murdoch University | 
 >--------------------------------------------------------------------<
| On nights such as this, evil deeds are done. And good deeds, of     /
| course. But mostly evil, on the whole.                             /
 \      -- (Terry Pratchett, Wyrd Sisters)                          /




More information about the plug mailing list