Thursday, November 08, 2007

Potentially excessive number of SPRequest objects currently unreleased on thread

Hopefully you'll never come across the error "Potentially excessive number of SPRequest objects (35) currently unreleased on thread 5". It seems it can occur in several situations due to issues in your code as well as due to issues within Microsoft Office SharePoint Server 2007.

In order to avoid the problem in your code ensure to properly dispose the SPWeb object as outlined in this Microsoft article as well as in this blog. One important thing missing is the SPWeb.Webs() object - if using this object you also need to dispose all webs within the collection.

Potential reasons include:

5 comments:

Anonymous said...

Unfortunately, I've got this issue on my development server. I think a 3rd party webpart might've caused this, something to think about when installing outside code.

How did you resolve this issue? thx in advance!

naveed said...

Hi All,

In our client's Production environement we are facing an issue where MOSS portal becomes non responsive (even in INETMGR on the server site does not open) and after an IIS reset, things will start working fine. When went through the Sharepoint logs we found the following entry.
"Potentially excessive number of SPRequest objects (400) currently unreleased on thread 8".
This is happening quite frequently and Developers are sure that they have followed best practices to dispose the SP objects. Please suggest us what best can be done from the SharePoint administrator's point of view. Any work arounds??

We are having MOSS 2007 Standard SP1. We are having one application server, one front end and one SQL 2005 Standard SP3 Database server ibn the MOSS farm.

Morten Marquard said...

Hi,
I have sometimes managed to read through the log in order to find the reason for the issue (at a time we had problems in our code in a specific situation) - the DLL and function causing the issue was listed. However, after having fixed the issue (we went through all code line by line to ensure everything is released properly) we still have the error - and currently we conclude it is SharePoint itself that causes the issue. Haven't reported it to Microsoft as we normally don't get any reply anyway.
Morten

naveed said...

As I had mentioned earlier the IISRESET releases the SPRequest objects and hence the MOSS Portal comes up again. Actually some part of our code is not disposing the objects properly. Development team is working on it but it will take some time. Since it is a Production environment we as MOSS Administrator have to come up with some work around for time being. other than clossely monitoring the resource utilisation on the Front End server , so that when CPU utilisation goes high for quite a sometime we can resort to IISRESET, what else have to be done? Any help, suggestions, comments will really help us a lot....thanks

Anonymous said...

Hi analyzing this web page was indeed very highly , texts in this way dignify who watchs this blog:)