[Twisted-Python] Twisted server connection loss with Mysql

Raghul J jraghul85 at hotmail.com
Thu Jun 2 10:54:43 MDT 2005


Hi Friends,

         My friend gave me a solution for the twisted server to

reconnect mysql.This was opening a database connection,excecuting a

query and closing the database connection.This works some what fine

with my application. I need to confirm that If this is ok and can be

deployed in live machine. Some people say that these won't be much

suitable and efficient.I also tried by putting cp_reconnect=1 but it didn't 
work. My code is

def excutequery:
	dbpool = adbapi.Connectionpool("db",host,passwd,cp_noisy=1)
	dbpool.connect()
	result = dbpool.runInteraction(......)
	dbpool.close()
	return result


I call this function in my program. This code is working fine but the

only thing I want to confirm is that whether it is stable and has a

good performance.Is there some other way to do this?

	I am eagerly waiting for this result,So as to deploy it in my

site.

Thanks in advance
raghul

_________________________________________________________________
Buy, sell or bid for anything! http://pages.ebay.in/msnindia/auctions.html 
Try MSN Auctions now!





More information about the Twisted-Python mailing list