Memory issues listing sites

Jun 23, 2008 at 10:34 AM
I'm trying to list all the sub-sites under a site which contains about 3000 sites. It always fails when trying to list the nodes, crashing when it reaches 1GB of memory saying:

"Server out of memory.
There is no memory on the server to run your program. Please contact your administrator with this problem"

When it fails I'm using about 3,8GB out of 10GB total on the server.
Jun 23, 2008 at 10:45 AM
Sometimes the application keeps running after the error above, sometimes it doesn't. When it keeps running I get the following error for example when trying to list the properties of a List on one of the sub-sites:

"BufferedGraphicsContext cannot be disposed of because a buffer operation is currently in progress."