September 20, 2002 at 2:48 pm
We're running sp_xml_preparedocument and getting error 6624, "XML document could not be created because server memory is low. Use sp_xml_removedocument to release XML documents." I'm told we're using sp_xml_removedocument already.
The problem only occurs on Win98. This particular machine has only 64 Mb of memory. We manually changed virtual memory to 256 minimum and a gig max, with no change in the error.
We are currently setting up a second 98 machine with more physical memory, but other than that, we are starting to run out of ideas.
Steve
Steve Miller
September 20, 2002 at 3:11 pm
More information: here's the code that generates the error:
declare @iXmlDoc int
declare @vcXml VARCHAR(1000)
set @vcXml = '<root><Obj Id="3578"/>,<Obj Id="3591"/>,<Obj Id="3722"/>,<Obj Id="3703"/>,<Obj Id="3693"/>,<Obj Id="3771"/>,<Obj Id="3829"/></root>'
exec sp_xml_preparedocument @iXmlDoc output, @vcXml
exec GetOrderedMultiTxtXml$ @iXmlDoc, 5001, 1
exec sp_xml_removedocument @iXmlDoc
Steve Miller
September 23, 2002 at 10:44 am
I know that there was a bug where XP_RemoveDoc wasn't releasing memory. Which SQL Version is this and which SP? Have you rebooted and are able to run it at least once?
Steve Jones
September 23, 2002 at 12:06 pm
>> Which SQL Version is this
SQL Server 2000, SP2
>> Have you rebooted and are able to run it at least once
The error is reproduceable after rebooting.
If I use my XP box and connect through the network to a 98 box, I execute the code in the first message and get the error.
>> I know that there was a bug where XP_RemoveDoc wasn't releasing memory.
Oh? That's interesting. I'll see if I can find it. You did mean sp_xml_removedocument, didn't you? (Not xp_RemoveDoc.)
Steve
Steve Miller
September 23, 2002 at 12:29 pm
The problem isn't on the release XML. I ran Profiler trace against the code above. The exception was thrown against:
exec sp_xml_preparedocument @iXmlDoc output, @vcXml
Now I suppose we could have a memory leak from a release sp_xml_removedocument, but I have a colleague who says he's rebooted the machine "a thousand times".
Steve
Steve Miller
October 12, 2002 at 9:32 am
Thought I had replied to this. The problem is more to do with the memory of the machine. The server only allows a certain amount of memory of XML documents, this is based on the physical memory, memory allocated to the server, memory available at startup and the 1/8th rule.
I go into detail about the memory usage in the book below.
Do you have other apps runing on the sql box if so stop as much as possible and then restart SQL server (memory available at startup is the key).
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
http://www.amazon.co.uk/exec/obidos/ASIN/1904347088
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 14, 2002 at 8:02 am
Simon,
You may have replied to this, but not to me. 🙂
We finally called MS with this problem. The problem comes in that the XML handler was bolted on to the Win 98 system, and the Win98 memory handler doesn't handle it very well. If nothing else is running, count to 10, bay at the moon, and click your heels together, you might get it to work with Win 98 and 64Mb. Once you start another app, forget it.
Steve
Steve
Steve Miller
October 14, 2002 at 2:05 pm
Just a serious case of deja vu.
OPENXML has been bolted on to all versions, it is probably just that in NT the memory management is better. It is nice to see from your post that the conclusions I have made from my testing have some foundation.
So did they say admit it was a bug or a feature. A feature that you can't use.
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
http://www.amazon.co.uk/exec/obidos/ASIN/1904347088
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
October 14, 2002 at 2:13 pm
I believe the wording from MS was that it "runs as it was coded". That's been the source of a great deal of entertainment among the developers here. They never came out and said it was a bug, but refunded our money (after a protest about being charged).
The bottom line is that Win 98 is an old platform, and this isn't exactly their priority. We understand; after this release we will be more than happy to stop supporting 98. We would have loved to stop awhile ago, but for our user base.
Steve
Steve Miller
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply