Re: freezes with multi-threading ?
Oleg Broytman <[email protected]>
| Newsgroups | gmane.comp.python.sqlobject |
|---|---|
| Message-ID | <[email protected]> |
Hi! Pity to listen you have problems. On Tue, Dec 04, 2012 at 01:02:52PM +0100, Sophana K <[email protected]> wrote: > Since about one year ago (maybe more...), from time to time (about every > week/month), the python process completely freezes under high load. It'd be helpful to find a version of SO that doesn't freeze. Unfortunately it requires to rollback your code and to run a lot of experiments. > Reading the code, I don't understand the call path from dbConnection to the > SqlHub. There shouldn't be any path -- you use sqlhub as the connection: class MyClass(SQLObject): _connection = sqlhub # Actually, this is the default sqlhub.threadConnection = connectionFromURI('...') Sqlhub's __get__ and __set__ methods return the real connection. > How is the connection pool managed? You can see the code at dbconnection.py stared at the line 332: class DBAPI, method getConnection. You can explicitly disable the pool by setting dbConnection._pool = None. > Is it thread safe? Should be. The pool is protected by _poolLock. Does something in the code trigger your suspicions? Oleg. -- Oleg Broytman http://phdru.name/ [email protected] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d