=?iso-8859-1?q?J=F8rn_Dahl-Stamnes?= Lost connection to MySQL server - need help.
Oct 12, 2013; 11:49
=?iso-8859-1?q?J=F8rn_Dahl-Stamnes?=
Lost connection to MySQL server - need help.
Hello,
I got a strange problem related to a production server. It has been working OK for months, but yesterday it start to fail. There are several batch scripts using the database in addition to a web application using it.
The php scripts running in batch mode began to get:
mysql_connect(): Lost connection to MySQL server at 'reading initial communication packet', system error: 111
I stopped the server and restarted it and everything seems to work OK for hours but when the load start to increase, the errors begin to appear again.
Today I noticed that after I starte phpMyAdmin and selected one of the databases, phpMyAdmin was hanging and the batch scripts began to fail again=2E Seems like the server does not handle much load anymore.
What's strange is the memory usage. The server is a quad core cpu with 48 Gb memory, where 28 Gb is allocated to innodb (we mostly use innodb). But when using top command, I noticed this:
VIRT: 33.9g RES: 9.4g SWAP: 23g
at this time over 11G memory is free. vm.swappiness is set to 0. I find it strange that the server is not able to use physical memory but use swap instead. The amount of cpu time used for swapping is rather high during sql queries. The amount of RESident memory may increase slowly over time but very slowly (it can take hours before it increase to 20+ Gb).
[PS: I also got a MySQL server running at a dedicated host at home, where the it seem to use the memory as I except it to use:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP DATA COMMAND 1462 mysql 20 0 30.0g 27g 3900 S 0.3 87.3 2633:14 844m 29g mysqld ]
I would like to have some suggestions what I can do to solve this problem. I have google'd it but found nothing that seem to solve my case.
Server: OS: Debian 6 MySQL: 5.1.61-0+squeeze1
my.cnf: # # The MySQL database server configuration file. #
[client] port = 3306 socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs # The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0
[mysqld] # # * Basic Settings # user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /database/mysql tmpdir = /tmp language = /usr/share/mysql/english skip-external-locking # # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. bind-address = 127.0.0.1 ## All applications use 127.0.0.1 when connectiong to the db.
# This replaces the startup script and checks MyISAM tables if needed # the first time they are touched myisam-recover = BACKUP # # * Query Cache Configuration # query_cache_limit = 1M
# # The following can be used as easy to replay backup logs or for replication. # note: if you are setting up a replication slave, see README.Debian about # other settings you may need to change. #server-id = 1 #log_bin = /var/log/mysql/mysql-bin.log expire_logs_days = 10 max_binlog_size = 100M #binlog_do_db = include_database_name #binlog_ignore_db = include_database_name # # * InnoDB # # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. # Read the manual for more InnoDB related options. There are many!
[mysql] #no-auto-rehash # faster start of mysql but no tab completition
[isamchk] key_buffer = 16M
# # * IMPORTANT: Additional settings that can override those from this file! # The files must end with '.cnf', otherwise they'll be ignored. # !includedir /etc/mysql/conf.d/
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql
Oct 12
nixofortune Re: Lost connection to MySQL server - need help.
Oct 12, 2013; 11:01
nixofortune
Re: Lost connection to MySQL server - need help.
Oct 12
=?iso-8859-1?q?J=F8rn_Dahl-Stamnes?= Re: Lost connection to MySQL server - need help.
Oct 12, 2013; 12:17
=?iso-8859-1?q?J=F8rn_Dahl-Stamnes?=
Re: Lost connection to MySQL server - need help.
Oct 12
Andrew Moore Re: Lost connection to MySQL server - need help.
Oct 12, 2013; 12:07
Andrew Moore
Re: Lost connection to MySQL server - need help.
Oct 12
=?iso-8859-1?q?J=F8rn_Dahl-Stamnes?= Re: Lost connection to MySQL server - need help.
Oct 12, 2013; 17:02
=?iso-8859-1?q?J=F8rn_Dahl-Stamnes?=
Re: Lost connection to MySQL server - need help.
Oct 12
Reindl Harald Re: Lost connection to MySQL server - need help.
Oct 12, 2013; 17:36
Reindl Harald
Re: Lost connection to MySQL server - need help.
Oct 12
=?iso-8859-1?q?J=F8rn_Dahl-Stamnes?= Re: Lost connection to MySQL server - need help.
Oct 12, 2013; 19:45
=?iso-8859-1?q?J=F8rn_Dahl-Stamnes?=
Re: Lost connection to MySQL server - need help.
Oct 12
Reindl Harald Re: Lost connection to MySQL server - need help.
Oct 12, 2013; 19:56
Reindl Harald
Re: Lost connection to MySQL server - need help.
Oct 12
Chris McKeever Re: Lost connection to MySQL server - need help.
Oct 12, 2013; 13:58
Chris McKeever
Re: Lost connection to MySQL server - need help.
Oct 12
Reindl Harald Re: Lost connection to MySQL server - need help.
Oct 12, 2013; 21:06
Reindl Harald
Re: Lost connection to MySQL server - need help.
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!