durusmail: durus-users: FileStorage bug?
FileStorage bug?
2004-10-15
2004-10-15
2004-10-15
2004-10-15
2004-10-15
2004-10-15
2004-10-15
2004-10-15
2004-10-15
FileStorage bug?
Neil Schemenauer
2004-10-15
On Fri, Oct 15, 2004 at 08:51:07PM +0900, Austine Jane wrote:
> Since there is no __del__ in FileStorage, it depends on python's
> ability to "del"ing all the remaining objects when it's closing
> the vm -- it doesn't explictly call "close" method in FileStorage.

I'm pretty sure adding __del__ will not help.   It will only be
called when the FileStorage instance is freed.  If that happens the
file object that it refers to should also be closed.

> However, when running durus with quixote on top of twisted server and I
> send SIGINT(via ctrl-c), there seems to be a problem. Restarting and
> terminating the application with SIGINT a couple of times, I encounter
> short read IOError.

Can you provide a traceback?  Also, are you using FileStorage
directly or are you using a storage server?

> At first, I though Durus was too fragile to use in a serious environment.
> To solve the problem, I used "atexit" in order to call the close method on
> connection.storage explicitly just before the shut down. Now I don't see
> short read error any more (so far).

That's probably the best solution.

  Neil

reply