On Thu, 2008-12-04 at 17:30 -0800, Julien Phalip wrote:
> Hi,
> 
> I have a pretty big database of organisations, countries and news
> entries. It all works fine except when I edit one of the organisations
> in the admin. The edit page loads fine, but when I click 'Save' it
> takes for ever before eventually timing out. The error my clients get
> on their system (IE7) is as follows:
> 
>     *  Error Code 1460: Timeout
>     * Background: The gateway could not receive a timely response from
> the website you are trying to access, a DNS server, or another gateway
> server. This might indicate that the network is congested or that the
> website is experiencing technical difficulties.
>     * Date: 5/12/2008 0:12:36 AM
>     * Source: Firewall
> 
> It works when editing any other organisation. I can't find anything
> suspicious in the data. It's pretty simple stuff, like address, phone
> number, etc.
> 
> I'm not sure where to start to debug this. Would you have any
> suggestion?

Since it sounds like you have a repeatable test case, you can run an
instrumented version of Django, repeat the situation and watch what is
going on. For example, turn on query logging on the database server and
see what query is being run (the query will probably finish, even if the
client is not going to receive the response).

Or put some prints into the affected view -- say "print >> sys.stderr,
time.time()" and maybe some line number information -- to see which
lines are executed when.

Essentially, you just keep adding debugging prints to track down which
line of code is taking a long time and then start investigating variable
values around that point. You might need to add prints inside Django to
get down the precise point, but since you know how to repeat the
problem, this is just a matter of persistence, not luck.

Regards,
Malcolm
=


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to