hi,


I'm using mysql mysql 4.0.18-log, and I'm having trouble (i tried also with an older 3.23.49-log and give the same).
It's running on debian 2.4.20.


I explain the case :

I've a multi-processes application, each of these process doing about that :

while (1)
{
 wait some client,
 while (1)
 {
   wait some command from client,
   do some work (1),
   connect to db,
   query,       # nb, all used query are very simple
   disconnect from db,
   some other work (2),
 }
 disconnect the client
}

the inner most { } could be executed many times during a second

the problem is that when the number of processes reach a certain limit (in my case, when i'm more than say : 500-600 process), there are some time to time some connect that returns error (always the same error) :

Can't connect to MySQL server on 'x.x.x.x' (99) (mysql_errno=2003). (when application on another host than db)
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (11) (mysql_errno=2002). (when on the same host)


What is not normal I think, is that that doesn't come at any time, and when there are the errors, they don't stay always, but remains only, says 1 or 2 seconds (sometimes more, sometimes less), less when there are fewer processes doing the connections, and more when there are ... yes, more (processes doing the connections) ;-).

Also, that looks like a cyclic problem :

yesterday night, i made a test :
I launched a lot (2000 exactly) of clients calling my application :

start :
time = 0 (each "|" is says 1 minute duration)
| ok
| ok
| ok
| ok
| ok
| ho some connections in the 2000 returned errors (maybe a lot, nearly all of the 2000)
| ho some connections in the 2000 returned errors
| ok,
| ok
| ok
| ok
... ||||||...||| ok so says there are no more error during 30 minutes
| errors (a lot)
| errors (a lot)
| errors (a lot)
||||| ok says for 5 minutes
| errors (some, so maybe only a few)
| errors (some)
||||||| ok for says 20 minutes
| errors (a lot)
| errors (a lot)
...
and so on during 6 hours ...


the greater duration with no error at all was nearly 50 minutes !

I tried many things, but don't really know where does that fact come from ..

So, here is my question:
Where does the hell that comes from ?

Thanks a lot if you can help me !


NB: if needed, here is my my.cnf :


# This will be passed to all mysql clients
[client]
#password    = my_password
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

[safe_mysqld]
err-log        = /var/log/mysql/mysql.err

[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
#
# You can also put it into /var/log/mysql/mysql.log but I leave it in /var/log
# for backward compatibility. Both location gets rotated by the cronjob.
log = /var/log/mysql/mysql.log
basedir = /usr
datadir = /var/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-locking
#
# The skip-networkin option will no longer be set via debconf menu.
# You have to manually change it if you want networking i.e. the server
# listening on port 3306. The default is "disable" - for security reasons.
#skip-networking
set-variable = key_buffer=64M
set-variable = max_allowed_packet=4M
set-variable = table_cache=512
set-variable = sort_buffer=2M
set-variable = record_buffer=2M
set-variable = thread_cache=2
set-variable = thread_stack=4K
set-variable = max_connections=5050
set-variable = max_connect_errors=100
set-variable = wait_timeout=600
# Try number of CPU's*2 for thread_concurrency
set-variable = thread_concurrency=4
set-variable = myisam_sort_buffer_size=64M
#
set-variable = long_query_time=30



set-variable = open-files-limit=36864



# # Here you can see queries with especially long duration log-slow-queries = /var/log/mysql/mysql-slow.log # # The following can be used as easy to replay backup logs or for replication #server-id = 1 #log-bin = /var/mysql/binlog/mysql-bin.log #binlog-do-db = mail_profiling #binlog-do-db = mail_profiling_devel #binlog-ignore-db = mysql #binlog-ignore-db = mail_accounting #binlog-ignore-db = mail_accounting_devel #binlog-ignore-db = mail_system #binlog-ignore-db = mail_system_devel #binlog-ignore-db = history #binlog-ignore-db = historydb #binlog-ignore-db = historydb_devel #binlog-do-db = include_database_name # # Read the manual if you want to enable InnoDB!

# skip-innodb

[mysqldump]
quick
set-variable    = max_allowed_packet=16M

[mysql]
#no-auto-rehash    # faster start of mysql but no tab completition

[isamchk]
set-variable    = key_buffer=128M
set-variable    = sort_buffer=128M
set-variable    = read_buffer=1M
set-variable    = write_buffer=1M

[myisamchk]
set-variable    = key_buffer=128M
set-variable    = sort_buffer=128M
set-variable    = read_buffer=1M
set-variable    = write_buffer=1M




-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to