Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 03-25-2008, 10:31 AM   #1
Registered: Mar 2005
Posts: 141

Rep: Reputation: 15
Mysql giving max connection errors, server has no connection limit.

I'm running a Debian Etch server, with Apache 1.33, MySQL 5.0.32 PHP5 and Postfix.

Randomly sites on the that use a MySQL database or Postfix will get a connection refused message

phpBB : Critical Error
Could not connect to the database

Mar 24 11:30:49 nix postfix/trivial-rewrite[28288]: warning: connect to mysql server Too many connections
I've checked the my.cnf and viewed the configuration through Phpmyadmin and verified that connection limits are set to 0. MySQL isn't at any point maxing out the cpu.

What's really strange is this problem will happen for 5-40 minutes if I don't intervene and then resolve itself.

Anyone seen this before? The server is pretty light useage, but is running on older hardware.
Old 03-26-2008, 04:06 AM   #2
Registered: Mar 2008
Location: Eindhoven
Distribution: Free BSD / CentOS/ Windows 2008
Posts: 42

Rep: Reputation: 15
Could you please check if setting the value of "thread_cache_size" to something like 32 in the /etc/mysql/my.cnf file in the [mysqld]-section might solve the issue, ie:

user = mysql
pid-file = /var/run/mysqld/
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
thread_cache_size = 32

or type this command in mysql console: show status like 'max_used_connections';


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql server connection error alok.rhct Linux - Server 1 10-04-2006 05:55 PM
MySql server socket connection ebarreto Programming 8 01-04-2005 09:06 PM
mysql connection errors smokingkills Linux - Software 0 10-13-2004 09:16 AM
Remote Connection to mysql server Graanco Linux - General 1 07-18-2003 11:27 PM
MySQL server connection problem aeshley Programming 1 03-05-2002 09:59 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:49 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration