From owner-freebsd-questions@FreeBSD.ORG Wed Feb 11 10:31:38 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8FFB106564A; Wed, 11 Feb 2009 10:31:38 +0000 (UTC) (envelope-from vince@unsane.co.uk) Received: from unsane.co.uk (unsane-pt.tunnel.tserv5.lon1.ipv6.he.net [IPv6:2001:470:1f08:110::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5CBF08FC1C; Wed, 11 Feb 2009 10:31:38 +0000 (UTC) (envelope-from vince@unsane.co.uk) Received: from vhoffman.lon.namesco.net (126.117-84-212.staticip.namesco.net [212.84.117.126]) (authenticated bits=0) by unsane.co.uk (8.14.3/8.14.0) with ESMTP id n1BAWigS097374 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 11 Feb 2009 10:32:45 GMT (envelope-from vince@unsane.co.uk) Message-ID: <4992A908.2030806@unsane.co.uk> Date: Wed, 11 Feb 2009 10:31:36 +0000 From: Vincent Hoffman User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.1b3pre) Gecko/20081204 Thunderbird/3.0b1 MIME-Version: 1.0 To: Ivan Voras References: <139b44430902100849r30b5144cxb5770fa45fa6c906@mail.gmail.com> In-Reply-To: X-Enigmail-Version: 0.96a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: mysqld out of memory X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2009 10:31:39 -0000 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