Eichhoernchen/SiriServer — Issue #347: Suggestion
Author: jimmykane
Created: 2012-02-28 02:27:35+00:00
State: open

In your code I think that you create a connection to the sqlite connection for each device (inbound connection)
This (either using epoll or not ) creates a big table of descriptors for the db connection, thus killing the process (its a matter of time and system resources).

remove the instace variables from the functions (self.dbconnection) and declare it as a global in :

class SiriServer(asyncore.dispatcher):

def __init__(self, host, port):
global dbConnection
dbConnection = db.getConnection()