Hi List:
I am just doing a test of my pylons site under medium load.
(ab2 -c 20 -n 5000 ...)
and got following errors:
2007-08-29 17:32:34,468 INFO [paste.httpserver.ThreadPool]
kill_hung_threads status: 10 threads (10 working, 0 idle, 0 starting)
ave time 2.24sec, max time 7.22sec, killed 0 workers
2007-08-29 17:32:40,874 INFO [paste.httpserver.ThreadPool]
kill_hung_threads status: 10 threads (10 working, 0 idle, 0 starting)
ave time 7.28sec, max time 13.63sec, killed 0 workers
Error - <class 'sqlalchemy.exceptions.TimeoutError'>: QueuePool limit
of size 5 overflow 10 reached, connection timed out, timeout 30
Error - <class 'sqlalchemy.exceptions.TimeoutError'>: QueuePool limit
of size 5 overflow 10 reached, connection timed out, timeout 30
Some Details of test environment:
$ uname -a
Linux scorpio 2.6.21-suspend2-r6 #2 SMP PREEMPT Tue Jul 24 18:13:15
CEST 2007 x86_64 Intel(R) Core(TM)2 CPU T5600 @ 1.83GHz GenuineIntel
GNU/Linux
$ postgres --version
postgres (PostgreSQL) 8.2.4
$ python
Python 2.5.1 (r251:54863, Aug 24 2007, 12:15:43)
[GCC 4.1.2 (Gentoo 4.1.2)] on linux2
>>> psycopg2.__version__
'2.0.2 (dec dt ext pq3)'
also tested with 2.0.5.1 and 2.0.6, same error
SQLAlchemy is from trunk r3419
I'am using scoped_session with elixir but I don't think it's the
point.
And the db query is simply select * from a single table, without
joins.
Engine is from engine_from_config, no extra options are given.
Swithing to option: poolclass = SingletonThreadPool seems to solve the
Problem.
And here is my model/__init__.py
from pylons import config
from sqlalchemy import MetaData
from sqlalchemy.orm import scoped_session, sessionmaker
# Global session manager. Session() returns the session object
appropriate for
# the current web request.
Session = scoped_session(
sessionmaker(
autoflush=True, transactional=True,
bind=config['pylons.g'].sa_engine
)
)
import elixir
elixir.objectstore = elixir.Objectstore(Session)
elixir.options_defaults.update({
'shortnames': True,
#'session': Session(),
#'inheritance': 'multi',
})
# Global Metadata
metadata = elixir.metadata
if not metadata.bind:
metadata.bind = config['pylons.g'].sa_engine
del config
# Shortcuts to elixir methods
create_all = elixir.create_all
cleanup_all = elixir.cleanup_all
drop_all = elixir.drop_all
setup_all = elixir.setup_all
from user import User, Group, Permission
from admin import ActionHistory
from localization import *
from meta import *
# preparing orm mapper
setup_all()
Did I do things right? Or just another Bug?
Thanks
Jian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---