Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Feb 2009 10:31:36 +0000
From:      Vincent Hoffman <vince@unsane.co.uk>
To:        Ivan Voras <ivoras@freebsd.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: mysqld out of memory
Message-ID:  <4992A908.2030806@unsane.co.uk>
In-Reply-To: <gmsbnq$dce$1@ger.gmane.org>
References:  <139b44430902100849r30b5144cxb5770fa45fa6c906@mail.gmail.com> <gmsbnq$dce$1@ger.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/2/09 16:58, Ivan Voras wrote:
> Valentin Bud wrote:
>
>   
>> I noticed that it is already at 1GB. Now my problem is how can i avoid this
>> in the future because
>> on that production server mysql is crucial or in case it happens how ca I be
>> the first to know
>> of that problem?
>>     
>
> If you examine the mysql-server script in /usr/local/etc/rc.d you'll see
> it supports the "mysql_limits" option for rc.conf. Set
> mysql_limits="YES" to /etc/rc.conf and the server start with removed limits.
>
> You can increase maxdsiz (which is different than limits) by adding a
> line to loader.conf, something like:
>
> kern.maxdsiz=2GB
> kern.dfldsiz=2GB
>
> Note that you can't increase it to more than 3 GB on i386.
>
> Another thing is that mysql shouldn't take infinite amounts of memory to
> work. You need to configure entries in my.cnf to match your limits and
> maxdsiz (in steady state + estimated spikes).
>
>   
I'd highly recommend databases/mysqltuner if only because it will tell
you the maximum possible memory your config will use (as well as
sensible config recommendations.)


Vince



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4992A908.2030806>