List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:May 14 1999 3:36pm
Subject:Killed processes / Server hanging
View as plain text  
>>>>> "Michael" == Michael Griffith <mgriffith@stripped> writes:

Michael> A week ago I posted a message about mysqld mysteriously taking 90% of the
Michael> CPU time (and usually crashing) at random intervals. I know I've seen
Michael> similar posts with no real solutions. I think I've found a clue and also at
Michael> least part of the cause on my BSDI setup.

Michael> Just to see what happened I ran 'unlimit' just before starting mysqld. It
Michael> still crashes, but only half as often! Some process limit is causing mysql
Michael> to hang up, but I can't narrow down to a specific resource or a specific
Michael> query. The crashes now seem to be unrelated to CPU load.

Hi!

The only 'fatal' limit I know of is if you get out of memory at some
critical point.  We have tried to have as few critical points as
possible, but there may still be some cases that isn't yet found.

You can get some information about memory usage by compiling MySQL
with --with-debug.  In this case 'mysqladmin status' will report
memory usage.

Michael> Also I noticed another peculiar behavior that may or may not be related. I
Michael> use PHP with persistent connections to mySQL. I've noticed in mysqladmin
Michael> that while the connection sleeps, it stays connected indefinitely, but the
Michael> connections in use always report a 'Time' connected of only a few seconds.

Are you sure that PHP doesn't do anything that you are not aware of?

When you do 'mysqladmin proc', does the 'Id' increase or stay the
same.  If the 'Id' increases, then PHP closes and reopens connections
the whole time.

By using 'mysqladmin status' you can monitor if how many questions are 
executed.

Try using:

mysqladmin -i1 proc status

to monitor what is going on.

Michael> I never close the connection programmatically. Unless PHP is doing it, why
Michael> would the threads automatically close and have to be reopened? they never
Michael> make it more than about a minute, and it seems to be related to when Queries
Michael> are issued.

Yours,
Monty
Thread
Killed processes / Server hangingMichael Griffith14 May
  • Re: Killed processes / Server hangingVivek Khera14 May
  • Killed processes / Server hangingMichael Widenius14 May