LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 03-25-2008, 11:31 AM   #1
Jukas
Member
 
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

Quote:
phpBB : Critical Error
Could not connect to the database

Mar 24 11:30:49 nix postfix/trivial-rewrite[28288]: warning: connect to mysql server 127.0.0.1: 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, 05:06 AM   #2
key4ce
Member
 
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:

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


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


Reply


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 06:55 PM
MySql server socket connection ebarreto Programming 8 01-04-2005 10:06 PM
mysql connection errors smokingkills Linux - Software 0 10-13-2004 10:16 AM
Remote Connection to mysql server Graanco Linux - General 1 07-19-2003 12:27 AM
MySQL server connection problem aeshley Programming 1 03-05-2002 10:59 PM


All times are GMT -5. The time now is 04:44 AM.

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