Python server locks up

Dave Angel davea at
Fri Sep 11 23:47:23 CEST 2009

Paul Rubin wrote:
> sturlamolden <sturlamolden at> writes:
>> Python uses reference counting, not a generational GC like Java. A
>> Python object is  destroyed when the refcount drops to 0. The GC only
>> collects cyclic references. If you create none, there are no GC delays
>> (you can in fact safely turn the GC off). Python does not share Java's
>> nasty habit of having long GC delays.
> If you drop the last reference to a large object (say a billion item
> dictionary), then Python can pause for quite a long time freeing
> all the constituents of that object.
(Both of these messages refer to an implementation, CPython, not the 
language Python.)

The key difference is that CPython "pauses" at a deterministic point in 
the code, because of something the program has specified, rather than at 
a point when some system measurement decides that now would be a good 
time for gc.

More information about the Python-list mailing list