Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #21 (permalink)  
Old October 5th, 2007, 12:54 PM
Registered User
 
Join Date: Oct 2007
Location: St. Petersburg, FL, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to wbretth
Default

We just started having the exact same problem. IIS 6 on Windows 2003 server SP2. ASP vbscript code just started randomly throwing runtime error #6 (overflow) at several places in the site. We separated out the web site into it's own (non-default) application pool, and for sure that made a difference - but it did not stop the problem.

Anyone find a solution yet? This is impacting our production system. We have an incident logged with MS - I'm surprised they don't know about this. Seems to be well documented (at least on this forum).

Brett Husselbaugh
eTelligent Solutions
Reply With Quote
  #22 (permalink)  
Old October 5th, 2007, 01:09 PM
Registered User
 
Join Date: Oct 2007
Location: St. Petersburg, FL, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to wbretth
Default

By the way, we have found that if you explictly type the variable to something other than the default variant type, you will not get the overflow error. It's a pain in the butt to find all the locations in code where you are doing simple arithmetic, but it does make the problem go away.

So, for example:

Do While (j <= iFields) And (j <= (i+iMaxCols-1)) ...

Gets re-written as ...

       iTestCols = CheckNull(CheckNull(i)+CheckNull(CheckNull(iMaxCol s)-1))
       Do While (j <= iFields) AND (j <= iTestCols)

And it works. CheckNull is our function that basically returns 0 if the variable sent is null, otherwise it returns cLng(<variable>)

Basically each step of the calculation is re-typed into a Long to avoid the overflow.

A fix of the root problem, of course, would be far better.



Brett Husselbaugh
eTelligent Solutions
Reply With Quote
  #23 (permalink)  
Old October 6th, 2007, 05:30 AM
Registered User
 
Join Date: Oct 2007
Location: St. Petersburg, FL, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to wbretth
Default

Spent a day with the MS engineers. The problem was fairly easy to recreate using a script with 1 line of code (simple arithmetic calculation)

Here's the FIX: download and install version 5.6 of vbscript.dll for Windows 2003 server. Most likely, the version you have installed is 5.7. As of this writing, even the latest 5.7 still exhibits the behavior.


Brett Husselbaugh
eTelligent Solutions
Reply With Quote
  #24 (permalink)  
Old January 8th, 2008, 04:08 PM
Registered User
 
Join Date: Jan 2008
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by wbretth
Here's the FIX: download and install version 5.6 of vbscript.dll for Windows 2003 server. Most likely, the version you have installed is 5.7. As of this writing, even the latest 5.7 still exhibits the behavior.
Brett,

Thanks for this tip. I've tried this and we'll let it go and see if it works. So far, its working, but I’m sure that is because the app pool got reset when i restarted the server.

I have the exact same problem. I tried to do something simple:

     Response.Write 1 + 1 / 1

And I get the overflow error

I’m using Win2k3 physical box, and then just moved to Win2k3R2 Virtual Machine, and that fixed it for a few weeks, but now its happening again.

Has anyone else had success with this fix or some other fix? I am still considering this an open issue. Feel free to contact me via this forum, or just post a reply.
Reply With Quote
  #25 (permalink)  
Old January 9th, 2008, 12:19 PM
Registered User
 
Join Date: Jan 2008
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by wbretth
Here's the FIX: download and install version 5.6 of vbscript.dll for Windows 2003 server. Most likely, the version you have installed is 5.7. As of this writing, even the latest 5.7 still exhibits the behavior.

Well, that didn't work. I'm back to square one again.


Reply With Quote
  #26 (permalink)  
Old January 9th, 2008, 04:46 PM
Registered User
 
Join Date: Jan 2008
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by nacsteveh
Well, that didn't work. I'm back to square one again.
so what i did was break up my application pools up into different onces for each site. i'm keeping an eye on them. it seems that there must be a memory leak on some other code that causes the process for rendering ASP pages w3wp.exe to get too big. It seems to break around 100meg. So now the biggest one is about 70 meg. Once the site starts having the overflow problems again, i'll check the size of the process. I expect it to be around 100 meg. Then i'll set up the resource pool for that site to "recycle" when it gets to a size of around 75 mb. (this is different from just killing and restarting the process)

I'll post more once i find out more.

if anyone wants to contact me just use the first three letters in my username as the domain with a .net after it. then the rest of the username including the h is my user before the at symbol.

Reply With Quote
  #27 (permalink)  
Old January 10th, 2008, 12:34 PM
Registered User
 
Join Date: Jan 2008
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by nacsteveh
I'll post more once i find out more.
so the problem seems to be fixed, but only a few more weeks of success will prove that its stable. It seems that by putting the sites in their own resource pools, it prevented all the sites from taking up too much ram (about 100meg) on the w3wp.exe process. That has kept the system running fine. My guess is that there are memory leaks such as opening a con and not closing it, and that fills up the buffers to a point where they break.

Reply With Quote
  #28 (permalink)  
Old January 11th, 2008, 09:40 AM
Registered User
 
Join Date: Jan 2008
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by nacsteveh
so the problem seems to be fixed, but only a few more weeks of success will prove that its stable.
so far, its running great.

Reply With Quote
  #29 (permalink)  
Old May 31st, 2008, 06:53 PM
Registered User
 
Join Date: Oct 2007
Location: St. Petersburg, FL, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to wbretth
Default

Quote:
quote:Originally posted by nacsteveh
 
Quote:
quote:Originally posted by wbretth
Quote:
Here's the FIX: download and install version 5.6 of vbscript.dll for Windows 2003 server. Most likely, the version you have installed is 5.7. As of this writing, even the latest 5.7 still exhibits the behavior.
Brett,

Thanks for this tip. I've tried this and we'll let it go and see if it works. So far, its working, but I’m sure that is because the app pool got reset when i restarted the server.

I have the exact same problem. I tried to do something simple:

     Response.Write 1 + 1 / 1

And I get the overflow error

I’m using Win2k3 physical box, and then just moved to Win2k3R2 Virtual Machine, and that fixed it for a few weeks, but now its happening again.

Has anyone else had success with this fix or some other fix? I am still considering this an open issue. Feel free to contact me via this forum, or just post a reply.



Brett Husselbaugh
eTelligent Solutions
Reply With Quote
  #30 (permalink)  
Old May 31st, 2008, 06:55 PM
Registered User
 
Join Date: Oct 2007
Location: St. Petersburg, FL, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to wbretth
Default

It's been a while and we have a complete fix. The MS engineer was excellent in isolating the issue and proving a fix. Here's what he found.

ASP does not reset the extended floating point error registers before performing an arithmetic operation, however it does check the extended registers for an error. If anything running on your server creates an error condition in the extended registers, you'll get this error. We run ChartFX, and that's when the issue started. The MS engineer wrote a little piece of code that we include as an object at the start of each page to reset the extended FP registers. It has made the problem complete go away. He couldn't get the MS developers to release a patch to correct the issue since he was successful in creating a work-around. We've been running with his workaround for several months without issue.

Brett.


Quote:
quote:Originally posted by nacsteveh
 
Quote:
quote:Originally posted by wbretth
Quote:
Here's the FIX: download and install version 5.6 of vbscript.dll for Windows 2003 server. Most likely, the version you have installed is 5.7. As of this writing, even the latest 5.7 still exhibits the behavior.
Brett,

Thanks for this tip. I've tried this and we'll let it go and see if it works. So far, its working, but I’m sure that is because the app pool got reset when i restarted the server.

I have the exact same problem. I tried to do something simple:

     Response.Write 1 + 1 / 1

And I get the overflow error

I’m using Win2k3 physical box, and then just moved to Win2k3R2 Virtual Machine, and that fixed it for a few weeks, but now its happening again.

Has anyone else had success with this fix or some other fix? I am still considering this an open issue. Feel free to contact me via this forum, or just post a reply.



Brett Husselbaugh
eTelligent Solutions
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Arithmetic overflow error gregalb Reporting Services 1 June 24th, 2008 02:42 PM
Odd arithmetic overflow error.... 7racer SQL Server 2000 4 May 12th, 2006 09:17 AM
arithmetic overflow problem flyfish SQL Server 2000 4 July 12th, 2005 04:37 PM
Arithmetic overflow error converting expression to sinapra Classic ASP Databases 8 September 3rd, 2004 12:24 AM
Arithmetic overflow error converting expression to spikey SQL Server 2000 1 June 24th, 2003 07:19 PM



All times are GMT -4. The time now is 09:04 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.