TurboGears hangs

1 view
Skip to first unread message

Stuart Clarke

unread,
Mar 23, 2007, 12:13:03 AM3/23/07
to turbo...@googlegroups.com
Hi,

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

kevin...@gmail.com

unread,
Mar 23, 2007, 12:26:26 AM3/23/07
to TurboGears
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.

:(

Jorge Godoy

unread,
Mar 23, 2007, 7:47:54 AM3/23/07
to turbo...@googlegroups.com
"kevin...@gmail.com" <kevin...@gmail.com> writes:

> 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>

Ed Singleton

unread,
Apr 23, 2007, 9:25:00 AM4/23/07
to turbo...@googlegroups.com, kevin...@gmail.com
Did you sort this out? I've been having the same problem and it
turned out it was a problem with the registration package.

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

Ed Singleton

unread,
Apr 24, 2007, 4:10:44 AM4/24/07
to turbo...@googlegroups.com, Stuart
On 4/24/07, Stuart <kevin...@gmail.com> wrote:
> Hi Ed,
>
> Were those lines causing your server to hang on startup, or some time
> thereafter?
>
> The problem I'm (still) having is that my server starts fine, and then
> operates over the course of a day or two. After that time, however, it
> hangs and becomes unresponsive.
>
> Obviously, each of the server threads is getting stuck somewhere. I
> just don't know where. I suspect it something to do with SMTP, but I
> can't be sure :(

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

Reply all
Reply to author
Forward
0 new messages