SharePoint memory leak

From: jakobsgaard (jakobsgaard_at_discussions.microsoft.com)
Date: 03/17/05


Date: Thu, 17 Mar 2005 03:41:02 -0800

TDC have a Sarbanes-Oxley site on SharePoint server, some times we need to
change the owner of some documents and for that purpose BearingPoint
has provided us with a C# MOSASO Bulk Update Utility, which we have modified
slightly. The problem is that it consumes a lot of memory, which is not
released again.
The w3wp.exe process uses an enormous amount of memory. We are facing the
same situation descriped in the post: Subject: Memory leak with WSS?
10/15/2004 8:14 AM PST.

When we restart the server, it uses about 600 MB, but after a few days the
memory usage has gone up to 3 GB - Does SharePoint cache some of the
documents in memory? Can you reset this cache? Is it possible to release
memory used by SharePoint?

Regards,

Ejnar Jakobsgaard - TDC - Denmark - www.tdc.dk

Configuration
-------------
Windows 2003
Internet Information Server 6.0
SharePoint Services - 6.0.2.5530 - without sp1
SQL Server with SharePoint database uses its own server

------------------------------
Subject: Memory leak with WSS? 10/15/2004 8:14 AM PST
By: DotNet-Force In: microsoft.public.sharepoint.windowsservices
---------------------------------------
Hi,

I am using Windows SharePoint Services 2.0. I have implemented a Web
Part that connects to a standard Document Library containing xml files.
This Web Part reads the contents of the selected file in the Document
Library. To read the contents of the file, I am using
SPFile.OpenBinary(). And then I am using an XmlDocument to load the
contents and do some processing on this contents.
I thought that when I had finished with this file all the objects used
(notably the XmlDocument) will be sent to the garbagge collector.
But I looked at the virtual memory used by the w3wp worker process.
Its virtual memory never decreases until it reaches the virtual memory
maximum size and I get a OutOfMemory exception.

I thought it was the fault of my web part. So I simply clicked on links
on my SharePoint browsing through the pages and doing some actions like
editing the views of a document library, and so.
During this test, I looked at the virtual memory used by w3wp and it is
always increasing all the time. It seems that Windows SharePoint
Services is never releasing memory?
Is it true? Or maybe I missed something?

It is unacceptable to let my web part causing an OutOfMemory exception.
The only solution I found so far is to customize the application pool to
recycle the w3wp worker process when it exceeds a given virtual memory
size but it is not a good solution.

Rachel
----------------------------------------
Hi Rachel,

Since this issue is related to the memory leak, in most scenarios, which
will need the debugging to perform the further research, I'd suggest you
can give me one repro steps so that I can test this issue for you. Greatly
appreciate!

My email address is: v-wdxu@online.microsoft.com (online should be removed,
which prevents the spam).

Look forward to your reply!

Best Regards,
Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights



Relevant Pages

  • Re: SBS 2003 Stalling Frequently
    ... Can I offload Symantec System Center and Server to a XP Pro SP2 workstation? ... Exchange should be left alone - it's normal for it to use as much as is ... You can configure the SharePoint database ... defaulted to the incorrect setting for allocated memory. ...
    (microsoft.public.windows.server.sbs)
  • Re: Event Id #9582 Information Store is fragmented
    ... The virtual memory address space is limited in size by ... > I would recommend that you run the Exchange Server Best Practice Analyzer ...
    (microsoft.public.exchange2000.information.store)
  • Re: Page File excessive usage
    ... using a huge amount of virtual memory. ... memory sizes and a reboot doesn't seem to affect it. ... Does anyone have any idea of what might be causing this memory usage? ... There's something seriously wrong with this server. ...
    (microsoft.public.windows.server.sbs)
  • cannot set working set size
    ... I have a non-production Compaq DL580 4CPU machine dedicated to SQL Server ... Application popup: Windows - Virtual Memory Minimum Too Low: Your system is ...
    (microsoft.public.sqlserver.server)
  • Re: W3WP memory usage
    ... You may be correct regarding the libraries using the lion's share of memory. ... > I am quite aware that Sharepoint files are stored in the database. ... >>> public class SPVersion ...
    (microsoft.public.sharepoint.portalserver.development)