MySQL Forums
Forum List  »  Router & Proxy

read queries not redirected to slave
Posted by: aclhkaclhk aclhkaclhk
Date: September 10, 2010 01:22AM

i am using 0.8.0.

after tried,
for i in `seq 1 500` ; do mysql -uroot -ppass -h127.0.0.1 -P 4040 -e "exit"; done ;

i tried a simple query. the console displayed a few times the following:
[read_query] 127.0.0.1:38008
current backend = 0
client default db = test
client username = root
query = select * from user
sending to backend : 192.168.123.1:3306
is_slave : false
server default db: test
server username : root
in_trans : false
in_calc_found : false
COM_QUERY : true


./mysql-proxy --proxy-backend-addresses=192.168.123.1:3306 --proxy-read-only-backend-addresses=192.168.123.2:3306 --proxy-lua-script=/root/mysqlproxy/share/doc/mysql-proxy/rw-splitting.lua --keepalive --log-level debug


startup log:
2010-09-10 03:24:10: (debug) chassis.c:163: we are the child: 9765
2010-09-10 03:24:10: (message) mysql-proxy 0.8.0 started
2010-09-10 03:24:10: (debug) chassis-limits.c:75: current RLIMIT_NOFILE = 1024 (hard: 1024)
2010-09-10 03:24:10: (debug) chassis-limits.c:79: trying to set new RLIMIT_NOFILE = 8192 (hard: 1024)
2010-09-10 03:24:10: (critical) chassis-limits.c:81: could not raise RLIMIT_NOFILE to 8192, Invalid argument (22). Current limit still 1024.
2010-09-10 03:24:10: (message) proxy listening on port :4040
2010-09-10 03:24:10: (message) added read/write backend: 192.168.123.1:3306
2010-09-10 03:24:10: (message) added read-only backend: 192.168.123.2:3306
2010-09-10 03:24:10: (message) chassis.c:178: [angel] we try to keep PID=9765 alive
2010-09-10 03:24:10: (debug) chassis.c:196: waiting for 9765

no queries to slave. any modification to rw-splitting.lua is needed? pls advise.



Edited 2 time(s). Last edit at 09/10/2010 02:46AM by aclhkaclhk aclhkaclhk.

Options: ReplyQuote


Subject
Views
Written By
Posted
read queries not redirected to slave
3446
September 10, 2010 01:22AM


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.