detect spinners

Bug #309883 reported by Aaron Swartz
2
Affects Status Importance Assigned to Milestone
web.py
Won't Fix
High
Anand Chitipothu

Bug Description

The most common reason web.py apps fail after launch is because there's some scenario under which they begin consuming lots of CPU for a long period of time, the GIL blocks everything, and the site fails (or becomes really slow).

web.py should have a method of detecting this and at least reporting it (so it can be fixed) if not preventing it. Right now you can't even debug these problems usually.

Aaron Swartz (aaronsw)
Changed in webpy:
assignee: nobody → anandology
importance: Undecided → High
status: New → Confirmed
description: updated
Revision history for this message
Aaron Swartz (aaronsw) wrote :

Here's some sample code that seems to accurately simulate a spinner, at least judging from my experience with them.

Revision history for this message
Aaron Swartz (aaronsw) wrote :

So Kragen's suggestion is to have web.application keep track of which pieces of code are being executed and make it so that at most three threads can execute the same piece of code at a time. The rest can block until a new slot opens up.

Plus, you can have it log when all three slots are full so that the code can be optimized/debugged.

Revision history for this message
Anand Chitipothu (anandology) wrote :

Lighttpd and Apache has mod_status which show the list of current requests along with times. That is good tool to detect spinners.

Changed in webpy:
milestone: none → 0.33
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.