From owner-freebsd-questions@FreeBSD.ORG Wed Aug 2 13:37:13 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A84016A4DE for ; Wed, 2 Aug 2006 13:37:13 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6549743D96 for ; Wed, 2 Aug 2006 13:36:49 +0000 (GMT) (envelope-from stapleton.41@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so1938623uge for ; Wed, 02 Aug 2006 06:36:48 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=JhA3iaIU3SXY+LoDOr0pFV0nBIt0vcT26IEJfagkHYB2/kIN8CMRna/nYKYdOqSxw5hk/eLsisQddTjDVNJOfJACjBhfmRDnI9euYEXcD+iar4F0FMWz0vQzH4704xjpBG1QiTVGPUAzy4hpuha+AsADT2K4FBLHm7BP1ume+28= Received: by 10.67.100.17 with SMTP id c17mr1004791ugm; Wed, 02 Aug 2006 06:36:48 -0700 (PDT) Received: by 10.67.86.18 with HTTP; Wed, 2 Aug 2006 06:36:48 -0700 (PDT) Message-ID: <80f4f2b20608020636o3dd712c9vf1aad9b6f3ba6e6f@mail.gmail.com> Date: Wed, 2 Aug 2006 09:36:48 -0400 From: "Jim Stapleton" To: freebsd-questions@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <31F1465C-5B87-4B79-8D58-0A538BF30562@partners.org> Subject: Re: Problems with MySQL since upgrade 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, 02 Aug 2006 13:37:13 -0000 Not sure, seems more of a mysql question, but here's some guesses I have for diagnostics. could you run these queries? SELECT COUNT(*) FROM users WHERE status < 3 SELECT COUNT(*) FROM sessiions WHERE sid = "d9fe25949f79f2c767a0d237b4fdf841" SELECT COUNT(*) FROM FROM users u INNER JOIN sessions s ON u.uid = s.uid WHERE s.sid = "d9fe25949f79f2c767a0d237b4fdf841" AND u.status < 3 -Jim Stapleton On 8/2/06, Richard Morse wrote: > > On Aug 1, 2006, at 9:24 AM, Richard Morse wrote: > > > Hi! I recently updated MySQL to version 5.0.22 using the ports > > system (portupgrade -r -R mysql-\*). Previous to this, MySQL was > > behaving perfectly normally. Since the upgrade, I have found that > > every so often -- sometimes two or three times a day, sometimes > > every other day, but no more often than that -- one of the > > databases MySQL is hosting starts misbehaving, MySQL starts > > climbing in processor usage, and I have to restart MySQL to > > recover. By "misbehaving", I mean that some subset of queries to > > this database start not returning -- they take forever. By > > climbing in processor usage, I mean that my load averages, which > > normally sit around 0, start going up to 3, 5, even 7. > > > > - How can I determine what query it is that is causing this to > > happen? I have turned on the log files by adding the following > > line to /etc/rc.conf: > > Hi! Since this time, I have, I think, found what query is causing > the problem: > > SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid > WHERE s.sid = "d9fe25949f79f2c767a0d237b4fdf841" AND u.status < 3 > LIMIT 0, 1 > > How can I determine _why_ this is causing MySQL to hang/enter some > kind of infinite loop? > > Thanks, > Ricky > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >