views:

163

answers:

2

I am getting an Interface Error/ Operational Error while running my Django application with FastCGI.On checking the access log ( of lighttpd) i find these errors pop up which are usually related to closing some db connection or the other. The browser displays one of the two things - Unhandled Exception or Connection Terminated unsuccessfully message. Upon refreshing the page once ( usually) the errors seem to go off. How can I prevent this from happening ? The system really behaves in an erratic fashion.

+1  A: 

There could be 2 reasons for this problem occuring. 1. Not all URLs mentioned in your urls.py are reversing properly. 2. This is the tough part - Somewhere in the project an import is failing. It may be importing a method which does not exist.

I faced the same problem and I discovered that there were many imports like the ones mentioned in the second point.

A: 

I faced the same problem, and wrote my own solution after finding nothing from the web. Please check my blogpost here: Simple Python Utility to check all Imports in your project

Ofcourse this will only help you to get to the solution of the original issue pretty quickly and not the actual solution for your problem by itself.

Maddy