Re: [SQLObject] freezes with multi-threading ?
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ph...> - 2012-12-04 22:52:28
|
Hi! Pity to listen you have problems. On Tue, Dec 04, 2012 at 01:02:52PM +0100, Sophana K <sop...@gm...> 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/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |