Re: Connection errors with rw-splitting.lua
Here is the script I am using. As I stated in the above message, the weird thing is I only get the disconnect when running the rw-split script against the remote server.
#!/usr/bin/env python2.4
import atexit
import MySQLdb
def main(host, port):
port = int(port)
pool = list()
for i in range(20):
print i,
try:
conn = MySQLdb.connect(db='xx', user='xx', passwd='xx', host=host, port=port)
except MySQLdb.Error, e:
print e
else:
print 'ok'
cursor = conn.cursor()
#res = cursor.execute("set names utf8")
pool.append((conn, cursor))
atexit.register(conn.close)
return pool
if __name__ == '__main__':
import sys
main(*sys.argv[1:])
Edited 1 time(s). Last edit at 10/29/2007 10:24AM by Ludovico Magnocavallo.
Subject
Views
Written By
Posted
7299
October 28, 2007 05:42PM
2940
October 29, 2007 05:01AM
Re: Connection errors with rw-splitting.lua
3141
October 29, 2007 05:22AM
2660
November 03, 2007 12:59AM
2927
November 09, 2007 05:45AM
2936
November 20, 2007 09:50AM
Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
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.