[storm] question about disconnects

Christopher Armstrong radix at twistedmatrix.com
Mon Mar 10 15:00:47 GMT 2008


On Mon, Mar 10, 2008 at 9:29 AM, shawn bright <nephish at gmail.com> wrote:
> Hey there all,
>
>  i am using storm ( the newest version) for a gtk GUI application on
>  Ubuntu 7.10.
>  I am wondering if there is a timeout for a storm store if it is
>  inactive for any length of time.

No, Storm doesn't have its own timeout.

>  but the GUI part will seem to
>  error out if left alone for several hours.

Well, you'll always have to deal with disconnections, but this can
probably be explained by a connection timeout in your database server.

>  I get this error:
>
>  Traceback (most recent call last):
...
>  storm.exceptions.DisconnectionError: Already disconnected
>
>  When the GUI first loads, there is one store that it uses for the
>  whole GUI, then other stores are created, one for each thread that
>  runs in the background.
>  the store is created like this
>  database = create_database(db_connect_string)
>  self.store = Store(database)
>
>  please advise.

You will have to catch the DisconnectionError and retry your transaction.

-- 
Christopher Armstrong
International Man of Twistery
http://radix.twistedmatrix.com/
http://twistedmatrix.com/
http://canonical.com/



More information about the storm mailing list