Subject: Re: FW: MySQL dies
To: =?iso-8859-1?Q?M=FCller=2C?= Markus <Markus.Mueller@itworks-gmbh.de>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: netbsd-users
Date: 01/14/2002 17:22:17
On Mon, Jan 14, 2002 at 09:48:12AM +0100, "Müller, Markus" wrote:
> <forgot to post to the list...>
> 
> More dumb rookie questions...
> 
> > You might check resource limits for the mysqld process, using
> > limit/ulimit/unlimit or whatever command your particular shell wants.
> 
> When I first set up the machine a colleague told me to put the line 
> --
> ulimit -d 256
> --
> in the beginning of safe_mysqld.
> In addition there is a ulimit fix for BSD systems in there.
> 
> It looks like this:
> --
> # Does this work on all systems?
> if type ulimit | grep "shell builtin" > /dev/null
> then
>   ulimit -n 256 > /dev/null 2>&1		# Fix for BSD and FreeBSD
> systems
> fi
> --
> 
> Like said, I'm a rookie, so I'm not sure what ulimit does...
> 
> > You can also use "sysctl proc.<process-id-of-your-process>" to examine
> > and change the limits.
> 
> # sysctl proc.24604
> 
> proc.24604.corename = %n.core
> proc.24604.rlimit.cputime.soft = unlimited
> proc.24604.rlimit.cputime.hard = unlimited
> proc.24604.rlimit.filesize.soft = unlimited
> proc.24604.rlimit.filesize.hard = unlimited
> proc.24604.rlimit.datasize.soft = 262144000
> proc.24604.rlimit.datasize.hard = 262144000
> proc.24604.rlimit.stacksize.soft = 2097152
> proc.24604.rlimit.stacksize.hard = 33554432
> proc.24604.rlimit.coredumpsize.soft = unlimited
> proc.24604.rlimit.coredumpsize.hard = unlimited
> proc.24604.rlimit.memoryuse.soft = 520790016
> proc.24604.rlimit.memoryuse.hard = 520790016
> proc.24604.rlimit.memorylocked.soft = 173596672
> proc.24604.rlimit.memorylocked.hard = 520790016
> proc.24604.rlimit.maxproc.soft = 80
> proc.24604.rlimit.maxproc.hard = 532
> proc.24604.rlimit.descriptors.soft = 256
> proc.24604.rlimit.descriptors.hard = 256
> # 
> 
> I think I understand the meaning of this output, but how could it help me
> solve my problem?

You can also use top and fstat to see if mysqld is reaching one of these
limits ...

Now, I notice that the stack size limit is low (2M). You may want to raise this
one too (should be ulimit -s).

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--