[sqlalchemy] ...kill_hung_threads status...

2010-09-30 Thread dobrysmak
Hi guys.

I keep getting this message:

[paste.httpserver.ThreadPool] kill_hung_threads status: 10 threads (1
working, 9 idle, 0 starting) ave time 0.03sec, max time 0.03sec,
killed 0 workers

Do I have to close a connection every time i'm querying the db?

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



Re: [sqlalchemy] ...kill_hung_threads status...

2010-09-30 Thread Michael Bayer

On Sep 30, 2010, at 10:26 AM, dobrysmak wrote:

 Hi guys.
 
 I keep getting this message:
 
 [paste.httpserver.ThreadPool] kill_hung_threads status: 10 threads (1
 working, 9 idle, 0 starting) ave time 0.03sec, max time 0.03sec,
 killed 0 workers
 
 Do I have to close a connection every time i'm querying the db?

I don't think that message is related to database connections.   With 
normal connection pool usage connections aren't closed, they're just sitting 
in a pool, and as long as you stick to the plan at 
http://www.sqlalchemy.org/docs/orm/session.html#lifespan-of-a-contextual-session
 , resources are released at the end of a request, or if an exception is raised 
(by removing within finally:).

If you had requests that were hung, a database like PG would show idle in 
transaction for long spans of time in your process listing.   Or you could use 
pg_stat_activity to see this.




-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



Re: [sqlalchemy] ...kill_hung_threads status...

2010-09-30 Thread Wichert Akkerman

On 9/30/10 16:26 , dobrysmak wrote:

Hi guys.

I keep getting this message:

[paste.httpserver.ThreadPool] kill_hung_threads status: 10 threads (1
working, 9 idle, 0 starting) ave time 0.03sec, max time 0.03sec,
killed 0 workers


that's just the paste httpserver checking if any of your application 
threads are stuck. It's a purely diagnostic message that you can safely 
ignore. It has no relation to SQLAlchemy.


Wichert.

--
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.