← Back to team overview

mysql-proxy-discuss team mailing list archive

rw-splitting: proxy chokes on MYSQLD_PACKET_EOF

 

Hello all,

I am running mysql-proxy-0.7.1.

I have 4 boxes running MySQL, one of those being master, the other nodes are
 slaves replicating from the master.

On each box a MySQL Proxy is running. Additionally, the master node runs another
MySQL Proxy as mysql-proxy-master.

Each mysql-proxy sends read requests to 127.0.0.1:3306 and write requests to the
MySQL Master Proxy on the master node, which in turn writes to 127.0.0.1:3306.
The slaves replicate via the MySQL Master Proxy.

That's the setup; not too compicated.. But all queries were directed to the MySQL
Master Proxy running on the master node.

After applying the patches from
  https://code.launchpad.net/~diego-fmpwizard/mysql-proxy/bug-43424/+merge/4259

and

  http://forums.mysql.com/read.php?146,265193,271355#msg-271355

the r/w-splitting seems to work fine, but after a few queries I get on the master:

2009-07-18 20:02:58: ((error)) network-mysqld-packet.c.470: COM_(0x11) should be (ERR|OK), got fe

At the same time, the client (a mysql-proxy running on a slave) reports:

[read_query] 10.1.2.3:35749
  current backend = 0
  client default db = database
  client username = db_user
  query = UPDATE my_table
    SET field = '1247940149'
    WHERE id = '2'
    AND field < '1247940149'
  statement = TK_SQL_UPDATE
  sending to backend : 10.1.2.1:4040
  is_slave : false
  server default db: database
  server username : db_user
  in_trans : false
  in_calc_found : false
  COM_QUERY : true
[read_query] 10.1.2.3:35749
  current backend = 0
  client default db = database
  client username = db_user
  query = COMMIT
  statement = TK_LITERAL
  sending to backend : 10.1.2.1:4040
  is_slave : false
  server default db: database
  server username : db_user
  in_trans : false
in_calc_found : 2009-07-18 20:02:58: (critical) proxy-plugin.c.1574: Cannot connect, all backends are down.

IMHO MySQL-Proxy shold handle an EOF gracefully. If I omit the rw-splitting.lua
script, all queries are sent to the MySL Master Proxy - that works like a charm;
but I need read/write splitting...

Any clues?

0--gg-


-- 
_($_=" "x(1<<5)."?\n".q/)Oo.  G\        /
                              /\_/(q    /
----------------------------  \__(m.====.(_("always off the crowd"))."
");sub _{s,/,($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e,e && print}



Follow ups