1

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!

Cheran Shunmugavel
  • 8,319
  • 1
  • 33
  • 40
Sam K
  • 214
  • 3
  • 14
  • 1
    the error is more related to resources not being free'd up - such as disposing objects after use, rather than actual physical resources like HDD space. – Darren Wainwright Jun 27 '13 at 21:00
  • 1
    check http://classicasp.aspfaq.com/general/i-have-plenty-of-ram-why-do-i-get-an-out-of-memory-error.html and http://stackoverflow.com/questions/4171522/maximum-array-of-strings-visualbasic-wsh – Flakes Jun 28 '13 at 09:50
  • 2
    .net has absolutely nothing to do with classic asp and vbscript – ulluoink Jun 28 '13 at 11:30
  • I am certainly well aware that Win2000 is out of support - but I also happen to be the Jr. tech who doesn't know much about ASP or IIS but was tasked with resolving this! Not a big cheese who decides when we retire a server ;) @SearchAndResQ It does seem to be related to this function that expands the Array so I feel like that first link is on the right track. If he's hitting some limit for ASP with this software though, is there anything I can do for him, or does he have to procure some sort of update/code change? If migrating him to a newer windows server will do the trick I can do that. – Sam K Jun 28 '13 at 13:54
  • Probably his site get many visitors so the Session is getting full. Don't use Session to hold the whole shopping cart, use database instead. – Shadow The GPT Wizard Jun 30 '13 at 11:37
  • just wanna say, loads of people still use Win2000 and WinXP and ClassicASP. Out of support is meaningless to many, it's just the security updates, what's the worst that could happen?? – Mr AH Jun 06 '14 at 14:29

1 Answers1

1

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.

BoffinBrain
  • 6,337
  • 6
  • 33
  • 59