Endless python thread quits without error -


i have python 2.7 program runs in endless loop synchronize remote mysql database local one. once day thread stops working.

def sync(): http = urllib3.poolmanager() urllib3.disable_warnings() while 1:     try:         db = mysqldb.connect(host="localhost", user="username", passwd="password", db="database")         cur = db.cursor()         cur.execute(device_sql)         devices = cur.fetchall()         cur.close()         print "loaded device_status local db"         logger.debug('%s\t\t\tloaded device_status local db' % (datetime.datetime.now().strftime('%y-%m-%d %h:%m:%s'))) #this whats gettin logged last     except:         failed += 1         try:             error(0, logger)         except:             raise     finally:         db.commit()         db.close() 

till here regarding logfile everythin ok, seems error occures here:

    try:         r = http.request('get', 'http://some.url.com' % (username, password, id))         print "loaded device_status remote db"         logger.debug('%s\t\t\tloaded device_status remote db' % (datetime.datetime.now().strftime('%y-%m-%d %h:%m:%s')))     except:         failed += 1         print "exception on getting devices status"         logger.debug('%s\t\t\texception on getting devices status' % (datetime.datetime.now().strftime('%y-%m-%d %h:%m:%s')))         try:             error(0, logger)         except:             raise 

it seems strange me, there no traceback or exception. can reason of such behaviour?


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -