Re: Server just hanging (Copying to tmp table)
There is something DEFINITELY related to open files. I don't see that MySQL is calling ulimit -n xxxx anywhere but I did add it to my script. I actually added "ulimit -n unlimited" and I see my open files limit is 12288 which is the number ulimit puts it to when running that command. I'm getting ahead of myself though. I'll tell you what happened to me this morning (at this point I hadn't added ulimit to the startup script).
Got a page at 6am. My servers were not responding again. I figured it was the server but I decided to take the opportunity to debug. This time I noticed it wasn't hung queries, it's that connections could not be made to the server. Mysqlreport said:
__ Tables ______________________________________________________________
Open 1.23k of 2400 %Cache: 51.42
Opened 6.71k 0.02/s
I checked ulimit -a and it was set to 1024 for "-n" but earlier yesterday I set that to unlimited so something changed it back! (Automated process somehow?)
when I set it to unlimited again on the command line connections started coming through. I found that interesting. Although on one site the server said that I must run "mysqladmin flush-hosts" in order to connect because there were too many concurrent connections (mysql report still listed only 198 out of 300 total connections used)
So, I ran flush-hosts and that allowed that site in and things started running nicer for a few minutes. Then things bogged down again and people couldn't connect (literally about 4 minutes later) I as confused as to why this happened so I checked ulimit again and it was still 12288. I checked mysql report and it was pretty much the same. I logged into the server and flushed tables and things started running smoothly again.
I noticed in sysctl that kern.maxfiles was set to 12288 so I thought this was related to ulimit -n being set to that max. (although I thought at the time ulimit was setting kern.maxfiles but I think that is the other way around) So, I set kern.maxfiles in sysctl.conf to 12288 and rebooted. I found that the server was still running with a ulimit of 1024 unless I manually changed it. So I added "ulimit -n unlimited" to the MySQL server startup script. And I now see what I reported to you at the top.
I think my server hit max files for some reason. I'm going to play around here and see what I can find out.
I know enough to be dangerous. Thanks for being patient!
Subject
Views
Written By
Posted
27498
August 11, 2005 11:25AM
23621
August 12, 2005 09:07AM
18927
August 12, 2005 01:06PM
18403
August 22, 2005 09:46AM
16492
August 24, 2005 03:27PM
12953
August 24, 2005 04:05PM
13639
August 26, 2005 11:02AM
7420
August 26, 2005 11:05AM
6801
August 26, 2005 11:45AM
6581
August 26, 2005 05:46PM
6849
August 26, 2005 10:34PM
6454
August 25, 2005 01:08PM
5850
August 26, 2005 11:07AM
5651
August 27, 2005 09:09AM
5976
August 29, 2005 11:50AM
5899
August 29, 2005 12:04PM
5256
August 29, 2005 12:55PM
5141
August 29, 2005 05:26PM
5112
August 29, 2005 06:34PM
4743
August 29, 2005 08:40PM
4630
August 29, 2005 08:47PM
4495
August 29, 2005 09:00PM
4691
August 30, 2005 10:05AM
4572
August 30, 2005 10:18AM
5084
August 30, 2005 10:20AM
6097
August 29, 2005 08:53PM
4962
August 29, 2005 09:50PM
4800
August 29, 2005 10:01PM
5241
August 30, 2005 08:53AM
4652
August 30, 2005 11:22AM
5198
August 30, 2005 11:33AM
4863
August 30, 2005 11:59AM
24328
August 31, 2005 02:32PM
6496
August 31, 2005 02:49PM
5181
August 31, 2005 02:56PM
5035
August 31, 2005 03:06PM
8269
December 07, 2006 10:30AM
4975
August 31, 2005 03:10PM
4846
August 31, 2005 03:32PM
17690
August 31, 2005 07:15PM
5089
September 01, 2005 03:05AM
7806
September 15, 2005 04:31PM
Re: Server just hanging (Copying to tmp table)
5527
September 01, 2005 04:39AM
4431
September 08, 2005 09:53AM
4790
September 08, 2005 11:25AM
4570
September 26, 2005 11:52AM
4480
September 26, 2005 12:13PM
4413
September 27, 2005 09:55AM
4194
September 27, 2005 10:18AM
4089
September 28, 2005 10:29AM
4237
September 28, 2005 10:34AM
4410
September 28, 2005 10:52AM
4874
September 28, 2005 10:58AM
9648
September 23, 2005 01:56AM
4935
September 23, 2005 07:11AM
4909
October 05, 2005 04:58AM
5127
October 05, 2005 04:52PM
6115
October 05, 2005 11:49PM
5377
October 06, 2005 01:34AM
6691
October 06, 2005 04:57PM
4625
December 13, 2005 10:28AM
4613
December 13, 2005 10:34AM
4519
November 17, 2005 09:39AM
4883
January 08, 2007 12:12PM
4750
December 12, 2005 02:13PM
4599
December 14, 2005 11:43PM
4193
December 15, 2005 08:37AM
4264
December 15, 2005 11:18AM
4177
December 15, 2005 11:27AM
4296
December 15, 2005 11:32AM
4049
December 15, 2005 11:43AM
4008
December 15, 2005 11:43AM
4179
December 15, 2005 11:48AM
4070
December 15, 2005 11:51AM
4463
December 15, 2005 02:14PM
4116
December 15, 2005 02:18PM
3984
December 15, 2005 02:27PM
4490
December 15, 2005 02:43PM
4033
December 15, 2005 08:46AM
5019
January 26, 2006 12:38PM
4143
January 26, 2006 01:48PM
4222
January 26, 2006 01:48PM
4004
January 26, 2006 01:52PM
4148
January 27, 2006 04:46PM
4026
January 29, 2006 11:21AM
4366
January 30, 2006 09:42AM
4397
February 27, 2006 02:17PM
4084
February 27, 2006 02:23PM
4312
March 05, 2006 04:56AM
4131
March 06, 2006 08:09AM
4098
April 05, 2006 01:03PM
4279
September 27, 2006 08:43AM
4233
November 19, 2006 04:42AM
4384
December 14, 2006 05:45PM
4203
February 01, 2007 04:40AM
4871
November 11, 2007 01:24PM
5080
December 20, 2007 10:40AM
6514
January 21, 2008 10:14AM
5854
January 21, 2008 10:53AM
5316
May 19, 2008 09:41AM
5527
February 05, 2008 10:27AM
6069
March 12, 2008 08:37AM
5389
May 19, 2008 03:02AM
6128
November 14, 2008 12:31AM
7138
March 06, 2009 03:36PM