I have an older Windows 2000 server running IIS 5. I have a number of websites installed on this server and one particular customer is running into an interesting error. He is using a VP-ASP Shopping Cart.
Microsoft VBScript runtime error '800a0007'
Out of memory
/cart/admin/admin$db.asp, line 558
The relevant code near that line:
'********************************************************************************
'all routines dealing with actual cart are here
'CartaddItem ()
'CartInit
'********************************************************************************
sub CartInit
dim ArrCart
dim MaxCartItems, CartAttributes
MaxCartItems=GetConfig("xMaxCartItems")
CartAttributes=cMaxCartAttributes
if MaxCartItems="" then exit sub
redim ArrCart(CartAttributes,MaxCartItems)
session("CartArray") = ArrCart
session("CartCount") = 0
end sub
The problem is, when he starts to get this error the machine is only using just over 50% of its memory. There is also still space available on the HDD.
The best suggestion I could find is that we should update .NET 1.1 SP1. I seem to be on .NET 1.1.4322 which as far as I can tell is the most up-to-date of 1.1.
Any suggestions towards solving this would be greatly appreciated!
I can see this question's gone unanswered for a long time and you've probably moved on, but I had this issue today and I solved it. Here's what happened...
While the error message was the same as yours and the line number pointed to code which reallocated space for an array using redim
like your example, that was just pointing to the place where the program finally ran out of memory - not the actual cause of the extra memory use.
Fortunately I remembered that I had made another experimental change recently in some ancient DB code:
Set dbProviderCon = Server.CreateObject("ADODB.Connection")
dbProviderCon.CursorLocation = adUseClient
I had commented out that last line to see what effect it would have. It turns out the effect was running out of memory. Importantly, on the line where my code was resizing an array, it was also getting the RecordCount property of a RecordSet. Here's another discussion about the issue. I hope this helps someone.