views:

184

answers:

2

I'm running Django through mod_wsgi and Apache (2.2.8) on Ubuntu 8.04.

I've been running Django on this setup for about 6 months without any problems. Yesterday, I moved my database (postgres 8.3) to its own server, and my Django site started refusing to load (the browser spinner would just keep spinning).

It works for about 10 mintues, then just stops. Apache is still able to serve static files. Just nothing through Django.

I've checked the apache error logs, and I don't see any entries that could be related. I'm not sure if this is a WSGI, Django, Apache, or Postgres issue?

Any ideas?

Thanks for your help!

A: 

It sounds a lot like there's something happening between django and your newly housed database.

Just to eliminate apache from the mix, you should run it as the dev server (on some random port to stop people using it) and see if you still have issues. If you do, it's the database. If it behaves, it could be apache.

Edit, This looks interesting. You can test that by applying his patch (commenting out the .close()) but there are other similar bugs floating around.

Oli
A: 

Found it! I'm using eventlet in some other code and I imported one of my modules into a django model. So eventlet was taking over and putting everything to "sleep".

erikcw