Does anyone here have experience with Turbogears hanging? My server is
doing just that under load, and I think it has something to do with open
DB transactions (or that's a symptom anyway).
Because once my server has hung, I can start an external process which
uses my tg config. And when it tries to modify the db, it just hangs,
much like the server itself.
Strange thing is, I can use tg-admin shell and make changes and commit,
and that works fine.
I'm using TG 1.0, SQLObject 0.7, and PostgreSQL 7.4.
Any ideas, or suggested mechanisms for debugging?
Thanks,
Stuart
:(
> Actually, scratch the comment about tg-admin. When the server is
> hung, I can go into psql directly and attempt to modify the user
> table, and it just sits there doing nothing.
Check your PostgreSQL logs. See what is happening. If there's a lock
somewhere or you're trying to acquire a lock -- or some automated process --
then things will freeze for this process until the operation has finished,
released the lock and the other are working.
--
Jorge Godoy <jgo...@gmail.com>
I removed the lines:
def create_registration_tables():
"Create the appropriate database tables."
RegistrationPendingUser.createTable(ifNotExists=True)
RegistrationUserEmailChange.createTable(ifNotExists=True)
# Automatically create the registration tables when TurboGears starts up
turbogears.startup.call_on_startup.append(create_registration_tables)
from the top of the registration model and all is fine now.
Ed
They were causing the server to hang the first time something tried to
write to the database. However they were also causing problems with
the autorestart feature (I'm still in dev).
I have had similar problems when using registration without TurboMail,
if my smtp server isn't working, because registration just sits and
waits for the smtp server, whereas if TurboMail is installed, it hands
it off to TurboMail, which then keeps trying repeatedly without
locking up the rest of the app.
If you find out what is causing your problems, let me know and I'll
write it up for the docs.
Ed