Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > python, Mysql_python, storm problem

Thread Tools

python, Mysql_python, storm problem

paul Batoum.
Posts: n/a

I am actually tryng to build a database apps in python + storm which use
MySQLdb 1.2.2
i actually want the auto reconnect feature of storm, which just need to
change the False param of raw_connect to True in storm/databases/ so
far nothing really difficult but from there i got quite a weird result:

if i try the following code, it works in the shell python interpreter but
not when i put it in a file and call it as python (will be
helpfull for unittest):

So to make it simple the MySQL reconnect work in the shell interpreter and i
got a DisconnectionError: (2006, 'MySQL server has gone away') when i use it
the other way.

Let me know if one of you have ever experienced something like that



import database
import time

# Test timeout cases
pdb = database.Database(connect_info)
res = pdb.execute(u"SHOW VARIABLES LIKE 'wait_timeout'")
# set the timeout to 3 sec
pdb.execute("SET wait_timeout=3")
res = pdb.execute(u"SHOW VARIABLES LIKE 'wait_timeout'")
res = pdb.execute("select * from country")
# try a new execute, this one should pass
res = pdb.execute("select * from country")

View this message in context:
Sent from the Python - python-list mailing list archive at

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
broadcast storm problem sunrock122000 Cisco 0 02-23-2008 10:42 AM
Evercool Ice Storm Review @ PC Modding Malaysia Silverstrand Front Page News 0 11-12-2005 06:20 PM
Strange ARP behaviour/storm from IOS 12.3(11)T3 Cisco 0 04-13-2005 02:40 AM
Frame Relay: Broadcast Storm? Robert B. Phillips II Cisco 4 10-29-2004 06:59 PM
any port in a storm is fine by me J Bard Cisco 11 01-02-2004 08:18 PM