Home All Groups Group Topic Archive Search About

sp_xml and memory usage

Author
18 Aug 2005 7:23 PM
AsaMonsey
We have a process that accepts a small XML message from an external
application and passes into SQL Server.  Our database used
sp_xml_preparedocument and sp_xml_removedocument.  We pay close attention to
make sure that all of our handles are "removed"

After this process runs for sometime, we start getting errors:

Following Exception occurred:
XML document could not be created because server memory is low. Use
sp_xml_removedocument to release XML documents.

I am reasonably certain that we are not "stranding" any xml documents in
memory.  Is there any way to check to see if there are any outstanding
references to prepared XML documents? 

Is there some process that we may be forgetting in terms of releasing memory?

Thanks in advance,
Asa Monsey

Author
18 Aug 2005 10:39 PM
oj
The only documented way to release memory is through xml_removedocument.
If you believe it's a memory leak, you would want to put together a repro
case and contact PSS ( perfmon log/trace, sample script would be needed).

Also, be sure to have your server updated to latest service pack. There was
a bug in openxml.
http://support.microsoft.com/kb/295053

--
-oj


Show quote
"AsaMonsey" <AsaMon***@discussions.microsoft.com> wrote in message
news:6C7F13B8-3E02-4565-8D5D-E37A3B65D723@microsoft.com...
> We have a process that accepts a small XML message from an external
> application and passes into SQL Server.  Our database used
> sp_xml_preparedocument and sp_xml_removedocument.  We pay close attention
> to
> make sure that all of our handles are "removed"
>
> After this process runs for sometime, we start getting errors:
>
> Following Exception occurred:
> XML document could not be created because server memory is low. Use
> sp_xml_removedocument to release XML documents.
>
> I am reasonably certain that we are not "stranding" any xml documents in
> memory.  Is there any way to check to see if there are any outstanding
> references to prepared XML documents?
>
> Is there some process that we may be forgetting in terms of releasing
> memory?
>
> Thanks in advance,
> Asa Monsey
>
Author
19 Aug 2005 2:50 PM
AsaMonsey
The server is patched to 8.00.818

This is a very reproducable problem.  I will look into contacting PSS.

Thanks for the info.

Show quote
"oj" wrote:

> The only documented way to release memory is through xml_removedocument.
> If you believe it's a memory leak, you would want to put together a repro
> case and contact PSS ( perfmon log/trace, sample script would be needed).
>
> Also, be sure to have your server updated to latest service pack. There was
> a bug in openxml.
> http://support.microsoft.com/kb/295053
>
> --
> -oj
>
>
> "AsaMonsey" <AsaMon***@discussions.microsoft.com> wrote in message
> news:6C7F13B8-3E02-4565-8D5D-E37A3B65D723@microsoft.com...
> > We have a process that accepts a small XML message from an external
> > application and passes into SQL Server.  Our database used
> > sp_xml_preparedocument and sp_xml_removedocument.  We pay close attention
> > to
> > make sure that all of our handles are "removed"
> >
> > After this process runs for sometime, we start getting errors:
> >
> > Following Exception occurred:
> > XML document could not be created because server memory is low. Use
> > sp_xml_removedocument to release XML documents.
> >
> > I am reasonably certain that we are not "stranding" any xml documents in
> > memory.  Is there any way to check to see if there are any outstanding
> > references to prepared XML documents?
> >
> > Is there some process that we may be forgetting in terms of releasing
> > memory?
> >
> > Thanks in advance,
> > Asa Monsey
> >
>
>
>

AddThis Social Bookmark Button