Bug #56789 | using pooled connection err | ||
---|---|---|---|
Submitted: | 15 Sep 2010 9:31 | Modified: | 17 Sep 2010 11:32 |
Reporter: | Zhang Guangpei | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Proxy: Core | Severity: | S3 (Non-critical) |
Version: | 0.8.0 | OS: | Linux (redhat5.4(32bit)) |
Assigned to: | CPU Architecture: | Any | |
Tags: | pooled connection proxy |
[15 Sep 2010 9:31]
Zhang Guangpei
[16 Sep 2010 19:02]
Sveta Smirnova
Thank you for the report. I can not repeat described behavior. Additionally version 0.8.0 is a bit outdated. Please upgrade to current version 0.8.1, try with it and inform us if problem still exists.
[17 Sep 2010 2:23]
Zhang Guangpei
lua script
Attachment: tutorial-keepalive.lua (text/plain), 6.97 KiB.
[17 Sep 2010 2:29]
Zhang Guangpei
I install it in 0.8.1 today,but the same thing happened. enviorment: ---------------- mysql-proxy -V mysql-proxy 0.8.1 chassis: mysql-proxy 0.8.1 glib2: 2.24.0 libevent: 1.4.14b-stable LUA: Lua 5.1.4 package.path: /usr/local/lib/mysql-proxy/lua/?.lua package.cpath: /usr/local/lib/mysql-proxy/lua/?.so -- modules admin: 0.8.1 proxy: 0.8.1 How to repeat it -------------------- Lua script: as I uploaded Run Command at 192.168.0.1:mysql-proxy --daemon --admin-address=:4401 --proxy-address=:4040 --log-level=debug --proxy-backend-addresses=192.168.0.2:3306 --proxy-read-only-backend-addresses=192.168.0.3:3306 --proxy-read-only-backend-addresses=192.168.0.4:3306 --admin-username=root --admin-password=abc789 --admin-lua-script=/usr/local/lib/mysql-proxy/lua/admin.lua --proxy-lua-script=/home/zhanggp/mysql-proxy-0.8.1/examples/tutorial-keepalive.lua I test like this : at the client: [rhel542]:/home/zhanggp#mysql -uroot -pabc789 -P4040 -h192.168.0.1 -D test -e "use test" [rhel542]:/home/zhanggp#mysql -uroot -pabc789 -P4040 -h192.168.0.1 -D test -e "use test" [rhel542]:/home/zhanggp#mysql -uroot -pabc789 -P4040 -h192.168.0.1 -D test -e "use test" [rhel542]:/home/zhanggp#mysql -uroot -pabc789 -P4040 -h192.168.0.1 -D test -e "use test" [rhel542]:/home/zhanggp# [rhel542]:/home/zhanggp#mysql -uroot -pabc789 -P4040 -h192.168.0.1 -D test -e "use test" ERROR 1047 (08S01): Unknown command then the debug info at the proxy : [connect_server] [1].connected_clients = 0 [1].idling_connections = 0 [1].type = 1 [1].state = 0 [1] open new connection [read_query] authed backend = 0 used db = test [read_query] authed backend = 0 used db = test [read_query] authed backend = 0 used db = test [read_query] authed backend = 0 used db = test [disconnect_client] 2010-09-17 10:15:29: (debug) abs wait-for-event::done usec= 0 2010-09-17 10:15:29: (debug) abs lua-exec::done usec= 0 [connect_server] [1].connected_clients = 0 [1].idling_connections = 1 [1].type = 1 [1].state = 1 [2].connected_clients = 0 [2].idling_connections = 0 [2].type = 2 [2].state = 0 [2] open new connection [read_query] authed backend = 0 used db = test [read_query] authed backend = 0 used db = test [read_query] authed backend = 0 used db = test [read_query] authed backend = 0 used db = test [disconnect_client] 2010-09-17 10:15:30: (debug) abs wait-for-event::done usec= 0 2010-09-17 10:15:30: (debug) abs lua-exec::done usec= 0 [connect_server] [1].connected_clients = 0 [1].idling_connections = 1 [1].type = 1 [1].state = 1 [2].connected_clients = 0 [2].idling_connections = 1 [2].type = 2 [2].state = 1 [3].connected_clients = 0 [3].idling_connections = 0 [3].type = 2 [3].state = 0 [3] open new connection [read_query] authed backend = 0 used db = test [read_query] authed backend = 0 used db = test [read_query] authed backend = 0 used db = test [read_query] authed backend = 0 used db = test [disconnect_client] 2010-09-17 10:15:31: (debug) abs wait-for-event::done usec= 0 2010-09-17 10:15:31: (debug) abs lua-exec::done usec= 0 [connect_server] [1].connected_clients = 0 [1].idling_connections = 1 [1].type = 1 [1].state = 1 [2].connected_clients = 0 [2].idling_connections = 1 [2].type = 2 [2].state = 1 [3].connected_clients = 0 [3].idling_connections = 1 [3].type = 2 [3].state = 1 opening new connection on: 1 [read_query] authed backend = 0 used db = test [read_query] authed backend = 0 used db = test [read_query] authed backend = 0 used db = test [read_query] authed backend = 0 used db = test [disconnect_client] 2010-09-17 10:15:39: (debug) abs wait-for-event::done usec= 0 2010-09-17 10:15:39: (debug) abs lua-exec::done usec= 0 [connect_server] [1].connected_clients = 0 [1].idling_connections = 2 [1].type = 1 [1].state = 1 [2].connected_clients = 0 [2].idling_connections = 1 [2].type = 2 [2].state = 1 [3].connected_clients = 0 [3].idling_connections = 1 [3].type = 2 [3].state = 1 using pooled connection from: 1 2010-09-17 10:15:51: (debug) [network-mysqld.c:937]: error on a connection (fd: -1 event: 0). closing client connection. [disconnect_client] please help me solve the problem,thanks very much!
[17 Sep 2010 9:46]
Zhang Guangpei
I have resolved the problem like this: modify the /etc/my.cnf as: old_passwords=0 and then enter mysql:SET PASSWORD FOR 'root'@'192.168.0.1' = PASSWORD('abc789'); everything goes ok. ========= but now I have another question more about the connection pool. when the clients sends many connections such as 1000 at the same time,but I just have 100 connections in the pool. if there are no idle connection in the pool,Can I use mysql-proxy to make the connection wait,not open new connection
[17 Sep 2010 11:32]
Sveta Smirnova
Thank you for the feedback. If old-passwords option was cause of the problem this is duplicate of bug #31574