Unix Technical Forum

MySQL crashed

This is a discussion on MySQL crashed within the MySQL forums, part of the Database Server Software category; --> We had an odd problem with Mysql the other day (v. 4.0 - RHEL3 up2date). Our web site stopped ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 07:29 AM
Arty
 
Posts: n/a
Default MySQL crashed


We had an odd problem with Mysql the other day (v. 4.0 - RHEL3 up2date).

Our web site stopped responding.
We logged in, and checked our log files.
1.nothing related in /var/log/messages.
2.too late to check dmesg.
3.no problems in the mysql log. There were active queries and looked as
if it were in use and running properly.

I was not around when the problem occured, but i was told that you could
hop into the mysql console, but it froze when you did "use database_name;"

I thought this was odd, as the log files show that the website didn't have
any trouble doing this.

at this point mysql was restarted, and operations resumed as normal.

What type of things should I be looking for to prevent this?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 07:29 AM
Arty
 
Posts: n/a
Default Re: MySQL crashed

I found why our mysql server crashed the other day.
Mysql gave several errors saying
"060311 10:06:01 Error in accept: Too many open files"

right now mysql has close to 3000 files open, which can vary by a few
hundred to a thousand every second. The entire system has on average about
4000 files open.

I thought this might be a problem, but /proc/sys/fs/file-max says we can
have 209708 files open...

ulimit -a shows this.
open files (-n) 1024

How do i fix this??
Obviously /proc/sys/fs/file-max is not the problem
/proc/sys/fs/file-ng shows "1665 1046 209708"
And that number in ulimit was the problem, would I be having trouble right
now??

Plz, help!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 07:29 AM
Peter H. Coffin
 
Posts: n/a
Default Re: MySQL crashed

On Mon, 13 Mar 2006 10:48:59 -0500, Arty wrote:
> I found why our mysql server crashed the other day.
> Mysql gave several errors saying
> "060311 10:06:01 Error in accept: Too many open files"
>
> right now mysql has close to 3000 files open, which can vary by a few
> hundred to a thousand every second. The entire system has on average about
> 4000 files open.
>
> I thought this might be a problem, but /proc/sys/fs/file-max says we can
> have 209708 files open...
>
> ulimit -a shows this.
> open files (-n) 1024
>
> How do i fix this??
> Obviously /proc/sys/fs/file-max is not the problem
> /proc/sys/fs/file-ng shows "1665 1046 209708"
> And that number in ulimit was the problem, would I be having trouble right
> now??
>
> Plz, help!


Check the user class restrictions on the user ID that mysqld runs under.
That will probably have a different number than the sustem-wide maximum
of open files.

--
They got rid of it because they judged it more trouble than it was worth.
(And considering they'd gone to great lengths to minimize its worth,
I suppose they were right.)
-- J. D. Baldwin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:17 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com