List:General Discussion« Previous MessageNext Message »
From:Rolando Edwards Date:March 2 2007 7:24pm
Subject:Re: Heavily-loaded MySQL: Resource temporarily unavavailable?
View as plain text  
Also consider

wait_timeout in my.ini

----- Original Message -----
From: "Rolando Edwards" <redwards@stripped>
To: "Chris Boot" <bootc@stripped>
Cc: mysql@stripped
Sent: Friday, March 2, 2007 2:19:38 PM (GMT-0500) Auto-Detected
Subject: Re: Heavily-loaded MySQL: Resource temporarily unavavailable?

I hope I am not asking dumb questions
but please consider the following:

1) Do you mysql_close every connection when rendering a page ?
2) Have you ever tried mysql_pconnect (which does not require doing a mysql_close to any
persistent connection) ?
3) Do you have interactive_timeout set (in seconds) in my.ini (default is 28800 [8 hours])
?
4) Do you have 'max_user_connections' set to zero (default anyway) in my.ini ?

----- Original Message -----
From: "Chris Boot" <bootc@stripped>
To: mysql@stripped
Sent: Friday, March 2, 2007 1:34:40 PM (GMT-0500) Auto-Detected
Subject: Heavily-loaded MySQL: Resource temporarily unavavailable?

All,

I'm running a loaded MySQL server and every so often MySQL seems to refuse
connections in batches, which manifests itself as the following errors in PHP:

mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]:
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
(11) [path to file] on line [x]

I've got a carefully tuned my.ini and Apache configuration, which can
theoretically process 400 connections at a time and this works most of the time.
MySQL is set to accept 600 simultaneous connections though this is never reached
(according to phpMyAdmin's stats anyway). I've upped the open files limit on
MySQL and Apache (PHP runs as a module).

At this stage I'm completely out of ideas as to what I can do to fix my problem.
Any ideas? What extra information can I provide that could help?

Many thanks,
Chris

-- 
Chris Boot
bootc@stripped
http://www.bootc.net/


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=1



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=1


Thread
Heavily-loaded MySQL: Resource temporarily unavavailable?Chris Boot2 Mar
  • Re: Heavily-loaded MySQL: Resource temporarily unavavailable?Rolando Edwards2 Mar
    • Re: Heavily-loaded MySQL: Resource temporarily unavavailable?Rolando Edwards2 Mar
      • Re: Heavily-loaded MySQL: Resource temporarily unavavailable?Chris Boot2 Mar
        • Re: Heavily-loaded MySQL: Resource temporarily unavavailable?Jay Pipes2 Mar
          • Re: Heavily-loaded MySQL: Resource temporarily unavavailable?Chris Boot2 Mar
            • Re: Heavily-loaded MySQL: Resource temporarily unavavailable?Jay Pipes2 Mar
              • Re: Heavily-loaded MySQL: Resource temporarily unavavailable?Chris Boot2 Mar
        • Need sql optimization helpBryan Cantwell3 Mar
          • Re: Need sql optimization helpPeter Brawley3 Mar
            • RE: Need sql optimization helpBryan Cantwell3 Mar
              • Re: Need sql optimization helpMichael Dykman3 Mar
                • Re: Need sql optimization helpPeter Brawley3 Mar