Help: Out of Memory Error, need advice
Mon, October 24, 2005 12:59 PM
Hey guys,
On our clubZone.com site, we are randomly seeing this error message appear on pages:
Microsoft VBScript compilation error ''800a03e9''
Out of memory
/company/venue_admin.asp, line 0
We''ve got 3 guys researching and working on it, but no luck. Everything we''ve found so far is talking about over X number of lines of code on a page causes that error, but we''ve combed through every page of code very carefully, broken apart some large function files, and made 100% sure that no pages were too long... yet we are still randomly seeing that error.
Does anyone have experience with this? Any opinions, advice, links to resource?
Cheers!
mike
www.Techvibes.com
Replies:
cIanDee on
Mon, October 24, 2005 1:10 PM
Hi mike,
Ive never seent his before, but i will try to help.
There could be many reasons causing this error, you might want to checkout a few of these:
MS KB
ASP.NET
It could also be caused by extremely long strings in asp. I think the limit in VBScirpt is1.022 characters (see link). Try to check if you dont have unreasonably long strings that might cause the problem.
Check this:
Strings fix
You might also want to monitor your web server with performance monitor to see what is happening when the error occurs.
its hard to help without a drirect access to the problem, but i hope this helps.
Mon, October 24, 2005 2:03 PM
Hey JDBN, thanks a lot for your feedback. I'm not a coder, so I'm asking our developers to come in here to discuss. Are you available for consulting work? We're looking to hire someone to dig into this particular issue as it has been a lot of time and no luck.
cheers,
mike
Navi on
Mon, October 24, 2005 2:10 PM
The MS KB issue only affects VBScript.dll 2.0 and earlier. Was fixed in 3.0, which shipped with IE 4 and IIS 4. (was hoping it might be our solution)
The long lines issue... pretty sure we've gone through every include file called on page loads, and split the long files into smaller, more manageable chunks, but still no luck.
The .net hotfix.... that's what I'm hoping for now. Have to wait til the end of the day, though, since our sys admin has a day job, and isn't available quite yet (and doesn't really like it too much when the devs install things on HIS server [;)] ).
Will update the thread once we try that one out.
Thank you for the suggestions.
cIanDee on
Mon, October 24, 2005 2:21 PM
Hi Mike,
thanks for the offer, very flattering [:)] . Sadly, im already highly overbooked as is and i jsut wish days had 48 hours. In the short term, i can surely help.
Mouellet, as i think about it, im pretty sure it could be the string lenghts being too long. The bug is probably not caused by your pages being too long (hence no need to split them in include files), but rather a string variable you must be using that turns out to be too big. (bigger than 1,022 chars).
For example, if you use strings to build very long SQL queries (which is very common), at some point, they may add up to more than 1,022 chars and cause your bug. Make sure you dont add up big queries, or strings. I suggest you watch your variables at runtime and see if you have candidates for "overflow".
By the error, i assumed you were using ASP 3.0 and that the error was server side, but do you get this error clientside? (that is, in the browser while navigating the page.)
I hope this helps
Navi on
Mon, October 24, 2005 2:43 PM
no no, i wasn't saying the pages were too long, the lines themselves, like the articles said. 1022+ chars / line.
Site is already broken into includes, i wasn't going through making sure every file was only 1021 characters long
Yes, it starts off saying 1022 chars per string, but then it goes on to say
"For non-SQL lines of code that are too large, you can use the second workaround listed previously."
The 2nd workaround is:
MySQL = "SELECT table.col1, table.col2 "
MySQL = MySQL & "FROM table "
MySQL = MySQL & "Where x = 3"
So according to that, we should be able to just break any large strings we're forced to us into multi-line strings, or am I still missing something?
Yes, we're using ASP 3.0, for the most part. However, there are a few items running on .NET, which is why that *could* possibly be the issue.
Grace58 on
Mon, October 24, 2005 2:43 PM
Hi there,
It would be helpful if you could post the chunk of code which causes that error. There can be numerous reasons why you get this erros. As some already suggested it can indeed be due to the fact that one of your strings is too long. Without seeing the code we can only come up with guesses which won't much of the help to you...
Cheers,
Dmitry
Navi on
Mon, October 24, 2005 2:47 PM
If we knew what code it was, would be slightly easier to fix.
Errors all say Line 0, so that's of no use. Errors happen randomly, on random pages, at random times, so again, doesn't help us trace.
Page will just refuse to load, throw up that error, for however long (again, random), and then start working again, like nothing ever happened.
I really do wish I had more information to share.
Grace58 on
Mon, October 24, 2005 2:50 PM
Just a quick suggestion. It is always better and far quicker to use stored procedures or views instead of constructing queries in your main .vb(in .NET) or .asp(in ASP 3.0) files. Not only it reduces traffic between your web and database server but also stored procedures and views get executed faster. Not to mention the long lines issue is unlikely to appear when you use stored procedures
Hope that this helps
Dmitry
Grace58 on
Mon, October 24, 2005 2:51 PM
What does the error log on the web box saying? There should be something linke VBScript error etc etc
ednathans on
Mon, October 24, 2005 2:52 PM
Memory Leak?
kpackeira on
Mon, October 24, 2005 2:53 PM
Hi Mike,
Here is a
site that may be useful for your developers, it addresses this problem and shows how to fix it. In fact, I found MSDN very helpful when I was working with VC++.
Cheers,
Victor.
kpackeira on
Mon, October 24, 2005 2:54 PM
----------------
On 10/24/2005 2:52:05 PM, berni305 wrote:
Memory Leak?
----------------
Memory leaks happen when you have pointers.
Grace58 on
Mon, October 24, 2005 2:58 PM
Unlikely because the problem is with the VBScript itself. When there is a memory leak it always says which component crashed. in their case it does give any information as to what is causing that error.
Dmitry
Grace58 on
Mon, October 24, 2005 3:13 PM
Another suggestion. Wou you could try combinging all your includes into 1 asp file and running it. It is quite possible that the error occurs in one of your includes and that can be one of the reason why asp.dll throws an error at line 0...
Cheers,
Dmitry
cIanDee on
Mon, October 24, 2005 3:45 PM
i agree with dimitri, you could try removing the includes. But, i suggest you check to make sure you dont have one variable being to a very long string as described here:
CAUSE
The ASP page contains a query that exceeds the 1,022 character line limit set by VBScript and you are using the Microsoft products listed at the beginning of this article.
Back to the top Back to the top
RESOLUTION
To correct this problem, you must first open the .ASP file using Notepad or another text editor, and break the SQL string into smaller segments. For example, assume that you have the following select statement within your ASP file:
sql = "Select * from MyTableName where FieldName = 'aaaa'"
This statement should be modified as follows:
sql = "Select *"
sql = sql & " from MyTableName"
sql = sql & " where FieldName = 'aaaa'"
kb
make sure you dont have a line somewhere where the string could be longer than 1.022 characters long. If you dont, then we will search deeper.
cIanDee on
Mon, October 24, 2005 3:53 PM
mouellet,
can you give us some information about the flow of evetns to get to the error?
i mean, doe it happen systematically on this very page, or must you perfoirm a routine to make it appear? and, does it interract with .net before you get the error? does it have an unusually long query string url? etc.
thanks.
veena on
Mon, October 24, 2005 10:24 PM
I'm not surprised you're having problems with your memory, but jeeze... this is clubZone right? Give yourself a break.... nobody remembers anything of relevance after a night at a club!
—pd—
cartfall on
Wed, November 16, 2005 8:15 AM
Hi! Mike-
We are facing same problem since last month and still we could not resolve the issue.
Can You share your information if you have solution?
We have tried On include as well as Limiting number of lines of code. Still no luck.
jaydhindsa on
Wed, November 16, 2005 8:34 AM
Just a shot in the dark, as I know NOTHING about VB:
Could there be an inordinate amount of LOCKED records in a particular query?
I sometimes get strange compilation and runtime errors which have led directly to the size of my LOCK TABLE. On a pure query, there are no problems. When an "update" of sorts applies to one or more of the queried records, strange errors sometime appear. Increasing the number of allowable record locks usually solves the problem. Of course, try to limit the locks to only the records being updated.
Naturally, check to make sure your statements are ENDED correctly!
-M.
Kevin on
Tue, August 19, 2008 7:53 PM
Hey if anyone has a solution to this problem, I'd REALLY REALLY appreciate anything you can share.
Anything at all would be great, we've been struggling with this for quite some time and it's absolutely puzzling.
Save exact problem described, Microsoft VBScript compilation error Out of memory. Even though there's plenty of memory available on the server. And happens randomly on pages and progressively gets worse as more stress hits the site over the course of hours.
Thank you!