Patent attributes
Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for preventing server overload. In one aspect, a method includes placing each request of a plurality of requests into a queue. Requests are popped from the queue, and for each popped request, in response to popping the request: a counter value is incremented; computing resources are allocated for the request; a determination is made that a condition for which computing resources allocated for the request can be de-allocated has occurred; and the counter value is decremented after the condition occurs. In response to determining that the counter value does not exceed a threshold number, requests continue to be popped from the queue. In response to determining that the counter value exceeds the threshold number, requests are not popped from the queue until the counter value is decremented to or below the threshold number.