MySQL Forums
Forum List  »  Router & Proxy

Connection errors with rw-splitting.lua
Posted by: Ludovico Magnocavallo
Date: October 28, 2007 05:42PM

Forgive me if I am asking something obvious, but I've started testing mysql proxy and I may have overlooked some key piece of information.

I am getting connection errors (2013, 'Lost connection to MySQL server during query') when using rw-splitting.lua against a remote server. The errors are not there if I only use the local server, or if I use mysql proxy against the remote server without rw-splitting. The two servers (remote and local) are a master-slave duo with the same OS (Ubuntu Linux), MySQL (5.0.22), and databases. MySQL proxy is 0.6.0 self-compiled (it links to liblua5.1.so.0, libevent-1.1a.so.1, etc.).

The errors are raised when I have more than .pool.min_idle connections + 1 active, and they repeat regularly (on failure, one success with pool.min_idle=3, two failures, two successes with pool.min_idle=6, etc.).

A snippet from the rw-splitting debug log showing the last "good" connection and the first "bad" connection shows this:

[connect_server] 127.0.0.1:13276
[1].connected_clients = 0
[1].pool.cur_idle = 0
[1].pool.max_idle = 6
[1].pool.min_idle = 3
[1].type = 1
[1].state = 1
[1] idle-conns below min-idle
[read_query] 127.0.0.1:13276
current backend = 0
client default db = top100_it
client username = ludo
query = set autocommit=0
sending to backend : 192.168.0.1:3306
is_slave : false
server default db: top100_it
server username : ludo
in_trans : false
in_calc_found : false
COM_QUERY : true

[connect_server] 127.0.0.1:13788
[1].connected_clients = 0
[1].pool.cur_idle = 4
[1].pool.max_idle = 6
[1].pool.min_idle = 3
[1].type = 1
[1].state = 1
[1] taking master as default
using pooled connection from: 1
[disconnect_client] 127.0.0.1:13788

Mysql proxy forces a disconnect on the newly connected client. I am testing with a very simple Python script that sequentially opens 10 connections, without doing anything with them.

Is this a know problem, or am I doing something wrong?

Thanks for any help.

Ludo

Options: ReplyQuote


Subject
Views
Written By
Posted
Connection errors with rw-splitting.lua
7109
October 28, 2007 05:42PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.