ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  "Out of Memory" Exception only in one Web
Posted by Jens Hartmann on Feb-05-2020 17:02
We were using ChartDirector ASP/COM/VB v5.1.1 for years on our Windows Webserver 2008R2 without problems. A few weeks ago we migrate to Windows Server 2019 and since then we ran into "Out of Memory" Exception (error '800a0007') when calling CreateObject("ChartDirector.API"). Not every time, but when for significant times (up to 1.000 times a day).

First thing we've done was doing an update to the latest Version 6.0.1 but the error still occurs.

The strange thing is, the error only show up in one specific web. We run multiple web application on our IIS and use the CD-component on several sites. Moreover the very same script in which the error is thrown is used on two websites simultaneously (via virtual directory).

We checked the script and found no error (object is set to nothing after execution)

So my question is: What may be the reason for that error considering the fact it only appears in one web application while it is used with no error on other applications on the same server.

Thanks in advance!

  Re: "Out of Memory" Exception only in one Web
Posted by Peter Kwan on Feb-06-2020 04:22
Hi Jens,

The CreateObject function is a VBScript function. Its purpose is to load the DLL. After loading the DLL, it should ask the DLL to execute some standard initialization code.

From your description, it seems the error occurs during loading, and it may occur before the DLL is being used. It may be a real "out of memory" error, or it may be some other issue. (The error message sometimes is not reliable.)

To diagnose the problem, if it is possible, please reboot the server to see if it still occurs. There is a possibility it is due to some memory corruption which will disappear after reboot.

Please check the Event Viewer to see if there is any suspicious event related to the error.

On 64-bit server, ChartDirector will be loaded using the operating system "COM Surrogate" process. When you create the ChartDirector.API object for the first time, you can see in the Task Manager that a "COM Surrogate (32-bit)" process will be created, which is the process which hosts the ChartDirector.API objects. If no new ChartDirector.API objects are created, the OS will terminate the process after a few seconds.

Some possibilities I can think of are:

(a) There is some memory corruption in the COM Surrogate, but it is not terminated because the server is busy and creating ChartDirector.API objects frequently.

(b) I read from the web that if the code using the objects in the COM Surrogate "crashes", the objects may get hung inside the COM Surrogate. The COM Surrogate is like a "server" providing the object API service, and the ASP/VBScript code the "client" using the object API. If the "client/server" connection is not shutdown gracefully, the server will free the object instance after an idle timeout of a few minutes. If the server is very busy and the code crashes often, there may be a lot of hung objects in a few minutes. As the COM Surrogate can use only 4G of RAM, there is a possibility of running out of memory.

(c) Sometimes incorrect parameters or excessive data can use up a lot of memory. An example is creating a chart that is exceptionally large (like 100000 pixels x 5000 pixels), or with a very large number of data points (eg. 100 million points for a line chart).

Please check if the "COM Surrogate (32-bit)" process is really using a lot of memory.

Peter Kwan