CreateObject takes a full minute in ASP
Re: CreateObject takes a full minute in ASP
Josep,
We tried TeeChart Pro ActiveX version v7.0.1.4 (unsigned). There was no difference. We still got the one minute delay if we used TeeChart after not using it for about two minutes.
We tried TeeChart Pro ActiveX version v7.0.1.4 (unsigned). There was no difference. We still got the one minute delay if we used TeeChart after not using it for about two minutes.
Re: CreateObject takes a full minute in ASP
Hi Dave,
We are just finalising setup of a Windows 2008 x64 server and will get back to this thread when we've checked TeeChart on it.
We are just finalising setup of a Windows 2008 x64 server and will get back to this thread when we've checked TeeChart on it.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: CreateObject takes a full minute in ASP
Hello,
We can repoduce the issue on Windows 2008. We believe this is a Windows2008/IIS specific problem only as no other x64 Windows platform we have tried shows the same symptoms. We are making enquiries but suggest that you forward a support request to your Microsoft representative to increase avenues of enquiry.
A non-elegant workaround that can help whilst the solution is being found is for you to run a keepalive page from a browser on the server.
Eg. keepalive.asp (here with an interval of 60 secs)
Regards,
Marc
We can repoduce the issue on Windows 2008. We believe this is a Windows2008/IIS specific problem only as no other x64 Windows platform we have tried shows the same symptoms. We are making enquiries but suggest that you forward a support request to your Microsoft representative to increase avenues of enquiry.
A non-elegant workaround that can help whilst the solution is being found is for you to run a keepalive page from a browser on the server.
Eg. keepalive.asp (here with an interval of 60 secs)
Code: Select all
<%
response.write("<html>")
response.write("<head>")
response.write("<META HTTP-EQUIV=""REFRESH"" CONTENT=""60; URL=keepalive.asp"">")
response.write("<title>object refresh</title></head>")
response.write("<body bgcolor=#FFFFFF>")
response.write( now() )
Set Chart1 = CreateObject("TeeChart.TChart")
response.write("<br>")
response.write( Chart1.Header.Text(0) )
response.write("</BODY>")
response.write("</html>")
%>
Marc
Steema Support
Re: CreateObject takes a full minute in ASP
We have already implemented a similar ugly workaround for our customers. We have a service where we can specify ASP pages to call. We wrote an ASP that simply does a CreateObject and then sets it to Nothing. This is executed every 60 seconds, as you suggested.
There is not much point in our contacting Microsoft on this issue because we have quite a few 32 bit DLLs and OCXs that we use that do not have this problem. The problem is isolated to the TeeChart7.ocx.
There is not much point in our contacting Microsoft on this issue because we have quite a few 32 bit DLLs and OCXs that we use that do not have this problem. The problem is isolated to the TeeChart7.ocx.
Re: CreateObject takes a full minute in ASP
Hello,
Re.
Are any of the other dlls you mention of a similar size to TeeChart?
Regards,
Marc
Re.
! ..and the problem _only_ occurs on x64 Windows 2008. Response is instant on the other Microsoft x64 platforms we have tested. We'll keep all avenues of investigation open for the moment.There is not much point in our contacting Microsoft on this issue because we have quite a few 32 bit DLLs and OCXs that we use that do not have this problem. The problem is isolated to the TeeChart7.ocx.
Are any of the other dlls you mention of a similar size to TeeChart?
Regards,
Marc
Steema Support
Re: CreateObject takes a full minute in ASP
Marc,
The largest DLL we use other than TeeChart is about 1.9 meg in size as compared to TeeChart at about 3.5 meg. So no, none of our other DLLs are as large as TeeChart.
The largest DLL we use other than TeeChart is about 1.9 meg in size as compared to TeeChart at about 3.5 meg. So no, none of our other DLLs are as large as TeeChart.
Re: CreateObject takes a full minute in ASP
Is there any solution for this issue yet?
Re: CreateObject takes a full minute in ASP
Hello,
Microsoft is investigating the issue. We don't have any feedback yet.
regards,
Marc Meumann
Microsoft is investigating the issue. We don't have any feedback yet.
regards,
Marc Meumann
Steema Support
Re: CreateObject takes a full minute in ASP
Hello,
Microsoft have responded that TeeChart's removal from the IIS cache is expected behaviour, in their words:
Traffic trace.
Windows responds to inactivity by removing TeeChart from memory.
00 0544f654 50424ad7 teechart7!UnregisterModule
01 0544f6b8 776f919c teechart7!Halt0+0x7b
02 0544f6d8 776f3e0a ntdll!zzz_AsmCodeRange_End
03 0544f788 776e2deb ntdll!LdrpUnloadDll+0x3d8
04 0544f7cc 76b823c1 ntdll!LdrUnloadDll+0x46
05 0544f7dc 76da8855 kernel32!FreeLibrary+0x76
06 0544f7e8 76da8869 ole32!CClassCache::CDllPathEntry::CFinishObject::Finish+0x2f
07 0544f7fc 76db73ad ole32!CClassCache::CFinishComposite::Finish+0x1d
08 0544f964 76db730b ole32!CClassCache::FreeUnused+0x1c6
09 0544f974 76db74fe ole32!CoFreeUnusedLibrariesEx+0x36
0a 0544f980 73dfc757 ole32!CoFreeUnusedLibraries+0x9
0b 0544f984 76f58817 comsvcs!STAFreeLibTimerProc+0x6
0c 0544f9b0 76f59899 user32!InternalCallWinProc+0x23
0d 0544fa28 76f58c24 user32!UserCallWinProc+0x104
0e 0544fa84 76f58b10 user32!DispatchMessageWorker+0x153
0f 0544fa94 73dfc913 user32!DispatchMessageW+0xf
10 0544fab0 73dfc819 comsvcs!CSTAQueueLessMessageWork::DoWork+0x4e
11 0544fac8 73dfd29d comsvcs!CSTAThread::DoWork+0x18
12 0544fae8 73dfd561 comsvcs!CSTAThread::ProcessQueueWork+0x37
13 0544fb48 75982599 comsvcs!CSTAThread::WorkerLoop+0x188
14 0544fb80 759826b3 msvcrt!_callthreadstartex+0x1b
15 0544fb88 76bfeccb msvcrt!_threadstartex+0x5f
16 0544fb94 7772d24d kernel32!BaseThreadInitThunk+0xe
17 0544fbd4 7772d45f ntdll!__RtlUserThreadStart+0x23
18 0544fbec 00000000 ntdll!_RtlUserThreadStart+0x1b
We don't yet have information on why the difference should occur on x64 Windows Server 2008 though in latest tests here we find it is also occurring on x64 Windows Vista. That behaviour may have been introduced as part of a recent Windows update and may too become apparent on other Windows IIS platforms.
Microsoft suggest this solution:
global.asa
One could instantiate the TeeChart object in the application global.asa file, as such the refcount for it never returns to zero and the COM+ service won't remove it from memory.
We ran a test here using this global.asa file in the application root folder; TeeChart remained in IIS cache successfully.
If multiple versions of TeeChart are present on the server then versions can be selected by using the version code.
eg.
We are enquiring as to whether other options exist, such as modifying server timeout behaviour. We will post that information here if there is any update.
Regards,
Marc Meumann
Microsoft have responded that TeeChart's removal from the IIS cache is expected behaviour, in their words:
ie. TeeChart is removed from cache as a result of inactivity timeout.behaviour appears 'completely normal'
Traffic trace.
Windows responds to inactivity by removing TeeChart from memory.
00 0544f654 50424ad7 teechart7!UnregisterModule
01 0544f6b8 776f919c teechart7!Halt0+0x7b
02 0544f6d8 776f3e0a ntdll!zzz_AsmCodeRange_End
03 0544f788 776e2deb ntdll!LdrpUnloadDll+0x3d8
04 0544f7cc 76b823c1 ntdll!LdrUnloadDll+0x46
05 0544f7dc 76da8855 kernel32!FreeLibrary+0x76
06 0544f7e8 76da8869 ole32!CClassCache::CDllPathEntry::CFinishObject::Finish+0x2f
07 0544f7fc 76db73ad ole32!CClassCache::CFinishComposite::Finish+0x1d
08 0544f964 76db730b ole32!CClassCache::FreeUnused+0x1c6
09 0544f974 76db74fe ole32!CoFreeUnusedLibrariesEx+0x36
0a 0544f980 73dfc757 ole32!CoFreeUnusedLibraries+0x9
0b 0544f984 76f58817 comsvcs!STAFreeLibTimerProc+0x6
0c 0544f9b0 76f59899 user32!InternalCallWinProc+0x23
0d 0544fa28 76f58c24 user32!UserCallWinProc+0x104
0e 0544fa84 76f58b10 user32!DispatchMessageWorker+0x153
0f 0544fa94 73dfc913 user32!DispatchMessageW+0xf
10 0544fab0 73dfc819 comsvcs!CSTAQueueLessMessageWork::DoWork+0x4e
11 0544fac8 73dfd29d comsvcs!CSTAThread::DoWork+0x18
12 0544fae8 73dfd561 comsvcs!CSTAThread::ProcessQueueWork+0x37
13 0544fb48 75982599 comsvcs!CSTAThread::WorkerLoop+0x188
14 0544fb80 759826b3 msvcrt!_callthreadstartex+0x1b
15 0544fb88 76bfeccb msvcrt!_threadstartex+0x5f
16 0544fb94 7772d24d kernel32!BaseThreadInitThunk+0xe
17 0544fbd4 7772d45f ntdll!__RtlUserThreadStart+0x23
18 0544fbec 00000000 ntdll!_RtlUserThreadStart+0x1b
We don't yet have information on why the difference should occur on x64 Windows Server 2008 though in latest tests here we find it is also occurring on x64 Windows Vista. That behaviour may have been introduced as part of a recent Windows update and may too become apparent on other Windows IIS platforms.
Microsoft suggest this solution:
global.asa
One could instantiate the TeeChart object in the application global.asa file, as such the refcount for it never returns to zero and the COM+ service won't remove it from memory.
We ran a test here using this global.asa file in the application root folder; TeeChart remained in IIS cache successfully.
Code: Select all
<object runat="server" scope="Application" id="TeeChartPlaceHolder" progid="TeeChart.TChart"></object>
eg.
Code: Select all
<object runat="server" scope="Application" id="TeeChartPlaceHolder" progid="TeeChart.TChart.7"></object>
Regards,
Marc Meumann
Steema Support
Re: CreateObject takes a full minute in ASP
Marc,
I tried adding the object tag as described to the top of global.asa as follows above the SCRIPT tag:
<object runat="server" scope="Application" id="TeeChartPlaceHolder" progid="TeeChart.TChart.7"></object>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
and also
<object runat="server" scope="Application" id="TeeChartPlaceHolder" progid="TeeChart.TChart"></object>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
This did not solve the issue. I still got the large delay after a few minutes. Did I do something wrong?
I tried adding the object tag as described to the top of global.asa as follows above the SCRIPT tag:
<object runat="server" scope="Application" id="TeeChartPlaceHolder" progid="TeeChart.TChart.7"></object>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
and also
<object runat="server" scope="Application" id="TeeChartPlaceHolder" progid="TeeChart.TChart"></object>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
This did not solve the issue. I still got the large delay after a few minutes. Did I do something wrong?
Re: CreateObject takes a full minute in ASP
Hello,
Confirm that if you're using TeeChart.TChart.7 in the global.asa file, that it is TeeChart.TChart.7 in the working scripts (may pick up later version of TeeChart if installed).
Confirm too that your application is recognising the global.asa file. On one of our test servers the location for the file was actually a more atomic folder level then the application itself.
To check that your global.asa is being read you could use these files:
example global.asa
example client script, chartcreate.asp (run this page)
Regards,
Marc Meumann
Confirm that if you're using TeeChart.TChart.7 in the global.asa file, that it is TeeChart.TChart.7 in the working scripts (may pick up later version of TeeChart if installed).
Confirm too that your application is recognising the global.asa file. On one of our test servers the location for the file was actually a more atomic folder level then the application itself.
To check that your global.asa is being read you could use these files:
example global.asa
Code: Select all
<object runat="server" scope="Application" id="TeeChartPlaceHolder" progid="TeeChart.TChart.7">
</object>
<script language="vbscript" runat="server">
sub Application_OnStart
TeeChartPlaceHolder.Header.Text(0) = "Title from Chart generated in global.asa"
Application("testtitle")=TeeChartPlaceHolder.Header.Text(0)
end sub
</script>
Code: Select all
<%
response.write("<html>")
response.write("<head>")
response.write("<title>object cache timeout tests</title></head>")
response.write("<body bgcolor=#FFFFFF>")
response.write(Application("testtitle"))
response.write("<br>")
response.write( now() )
Set Chart1 = CreateObject("TeeChart.TChart.7")
response.write("<br>")
response.write( Chart1.Header.Text(0) )
response.write("</BODY>")
response.write("</html>")
%>
Marc Meumann
Steema Support
Re: CreateObject takes a full minute in ASP
Hi Marc. We have new and clarified information about this issue.
1. On Win2k8 64, IIS7, we are certain that whenever the TeeChart Object is loaded into the w3wp.exe*32 process,
(initial load, or subsequent reload after a 2 min or more period of inactivity) it ALWAYS delays for EXACTLY 60 seconds.
2. This 60 second delay is evidenced by this WinDbg trace of the w3wp thread that throws a
first chance exception, and then allowed us to do a stack trace (below) that shows the TeeChart object
has made a call to Winspool.PrinterProperties that seems to be trying to open a dialog window on the server...
1422c558 75d80fda 000006ba 00000001 00000000 KERNEL32!RaiseException+0x59
1422c574 75d8f061 000006ba 00000000 1422c998 RPCRT4!RpcRaiseException+0x35
1422c584 75e10120 1422c5d4 00000000 015547c8 RPCRT4!NdrConformantVaryingArrayFree+0x8e
1422c998 75d92c67 75d7a7a0 75d92cd8 1422c9b8 RPCRT4!NdrClientCall2+0x11b
1422c9b0 75d92c30 015547c8 1422c9c0 00000000 RPCRT4!RpcMgmtIsServerListening+0x64
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\SysWOW64\winspool.drv -
1422c9c4 73be3803 015547c8 803efe2e 00000000 RPCRT4!RpcMgmtIsServerListening+0x2d
1422cf1c 73be40cf 00000000 1422cfc4 73be4581 winspool!StartDocDlgW+0x6a8
1422cf28 73be4581 00000000 803efef6 122a2090 winspool!Ordinal224+0x4a
1422cfc4 73bdb414 00000000 122b637c 123acea4 winspool!PrinterProperties+0x11e
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\SysWOW64\TeeChart7.ocx -
1422cffc 5046478c 00000000 122b637c 143f6cb0 winspool!DocumentPropertiesA+0x40
1422d0fc 50465007 00000000 504250c5 1422d118 TeeChart7!DllUnregisterServer+0x2490c
1422d558 50464b2a 0022d610 143f6bd0 1422d588 TeeChart7!DllUnregisterServer+0x25187
1422d568 50464a55 1422d590 50464aaa 1422d588 TeeChart7!DllUnregisterServer+0x24caa
1422d588 5064d73f 1422d59c 5064d749 1422d610 TeeChart7!DllUnregisterServer+0x24bd5
1422d610 5064ee40 1422d62c 5064ee79 1422d624 TeeChart7!DllUnregisterServer+0x20d8bf
1422d624 504247bf 1422d690 504247cd 1422d64c TeeChart7!DllUnregisterServer+0x20efc0
1422d64c 504248ac 5042751d 00000000 506a2a78 TeeChart7+0x47bf
1422d69c 7759fcc0 50420000 00000001 00000000 TeeChart7+0x48ac
1422d6bc 775a9b28 506a2a68 50420000 00000001 ntdll_77570000!RtlReleasePebLock+0x28
1422d7b4 775a95ae 00000000 697be880 00000000 ntdll_77570000!LdrFindResourceDirectory_U+0x9bf
1422da38 775c29db 00000000 122c06b0 1422dd2c ntdll_77570000!LdrFindResourceDirectory_U+0x445
1422dcbc 76144648 122c06b0 1422dd2c 1422dcec ntdll_77570000!RtlDestroyQueryDebugBuffer+0x48d5
1422dd20 7600b38f 1422dd9c 00000000 00000008 KERNEL32!LoadLibraryExW+0x114
.
.
.
Note for this request the Request.ServerVariables("HTTP_USER_AGENT") = "Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+Trident/4.0;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.648;+InfoPath.1;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729)".
3. But, when we make the same request from a browser-less service, it DOES NOT delay ever.
The response is always returned instantly (usually < 1 second).
Note in that case the Request.ServerVariables("HTTP_USER_AGENT") = "".
4. Is it possible the TeeChart init method(s) have a 60-second timer on a call that for some reason
is unnecessarily opening that winspool printer dialog when the user-agent is a browser?
And then closing it after 60 seconds have elapsed and there has been no input (obviously)?
Note that a browser-less request to the same page (from a C# windows service) ALWAYS returns instantly.
5. All you need to reproduce this is a simple asp page that creates the TeeChart object.
Then wait more than 2 min between invocations of the test.asp page you create.
Here is the one we use...
Questions? Thanks so much and sorry for the earlier information which was not as accurate as this.
1. On Win2k8 64, IIS7, we are certain that whenever the TeeChart Object is loaded into the w3wp.exe*32 process,
(initial load, or subsequent reload after a 2 min or more period of inactivity) it ALWAYS delays for EXACTLY 60 seconds.
2. This 60 second delay is evidenced by this WinDbg trace of the w3wp thread that throws a
first chance exception, and then allowed us to do a stack trace (below) that shows the TeeChart object
has made a call to Winspool.PrinterProperties that seems to be trying to open a dialog window on the server...
1422c558 75d80fda 000006ba 00000001 00000000 KERNEL32!RaiseException+0x59
1422c574 75d8f061 000006ba 00000000 1422c998 RPCRT4!RpcRaiseException+0x35
1422c584 75e10120 1422c5d4 00000000 015547c8 RPCRT4!NdrConformantVaryingArrayFree+0x8e
1422c998 75d92c67 75d7a7a0 75d92cd8 1422c9b8 RPCRT4!NdrClientCall2+0x11b
1422c9b0 75d92c30 015547c8 1422c9c0 00000000 RPCRT4!RpcMgmtIsServerListening+0x64
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\SysWOW64\winspool.drv -
1422c9c4 73be3803 015547c8 803efe2e 00000000 RPCRT4!RpcMgmtIsServerListening+0x2d
1422cf1c 73be40cf 00000000 1422cfc4 73be4581 winspool!StartDocDlgW+0x6a8
1422cf28 73be4581 00000000 803efef6 122a2090 winspool!Ordinal224+0x4a
1422cfc4 73bdb414 00000000 122b637c 123acea4 winspool!PrinterProperties+0x11e
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\SysWOW64\TeeChart7.ocx -
1422cffc 5046478c 00000000 122b637c 143f6cb0 winspool!DocumentPropertiesA+0x40
1422d0fc 50465007 00000000 504250c5 1422d118 TeeChart7!DllUnregisterServer+0x2490c
1422d558 50464b2a 0022d610 143f6bd0 1422d588 TeeChart7!DllUnregisterServer+0x25187
1422d568 50464a55 1422d590 50464aaa 1422d588 TeeChart7!DllUnregisterServer+0x24caa
1422d588 5064d73f 1422d59c 5064d749 1422d610 TeeChart7!DllUnregisterServer+0x24bd5
1422d610 5064ee40 1422d62c 5064ee79 1422d624 TeeChart7!DllUnregisterServer+0x20d8bf
1422d624 504247bf 1422d690 504247cd 1422d64c TeeChart7!DllUnregisterServer+0x20efc0
1422d64c 504248ac 5042751d 00000000 506a2a78 TeeChart7+0x47bf
1422d69c 7759fcc0 50420000 00000001 00000000 TeeChart7+0x48ac
1422d6bc 775a9b28 506a2a68 50420000 00000001 ntdll_77570000!RtlReleasePebLock+0x28
1422d7b4 775a95ae 00000000 697be880 00000000 ntdll_77570000!LdrFindResourceDirectory_U+0x9bf
1422da38 775c29db 00000000 122c06b0 1422dd2c ntdll_77570000!LdrFindResourceDirectory_U+0x445
1422dcbc 76144648 122c06b0 1422dd2c 1422dcec ntdll_77570000!RtlDestroyQueryDebugBuffer+0x48d5
1422dd20 7600b38f 1422dd9c 00000000 00000008 KERNEL32!LoadLibraryExW+0x114
.
.
.
Note for this request the Request.ServerVariables("HTTP_USER_AGENT") = "Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+Trident/4.0;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.648;+InfoPath.1;+.NET+CLR+3.0.4506.2152;+.NET+CLR+3.5.30729)".
3. But, when we make the same request from a browser-less service, it DOES NOT delay ever.
The response is always returned instantly (usually < 1 second).
Note in that case the Request.ServerVariables("HTTP_USER_AGENT") = "".
4. Is it possible the TeeChart init method(s) have a 60-second timer on a call that for some reason
is unnecessarily opening that winspool printer dialog when the user-agent is a browser?
And then closing it after 60 seconds have elapsed and there has been no input (obviously)?
Note that a browser-less request to the same page (from a C# windows service) ALWAYS returns instantly.
5. All you need to reproduce this is a simple asp page that creates the TeeChart object.
Then wait more than 2 min between invocations of the test.asp page you create.
Here is the one we use...
Code: Select all
<%@ language=VBScript CodePage=65001 %>
<%option explicit%>
<%
Response.Charset = "UTF-8"
Response.Expires = -1
Response.CacheControl = "no-cache"
Response.AddHeader "pragma", "no-cache"
Dim Chart
Set Chart = CreateObject("TeeChart.TChart.7")
Set Chart = Nothing
Response.End
%>
Re: CreateObject takes a full minute in ASP
Marc (and Support), more info on this...
Following the similarity of this issue http://www.teechart.net/support/viewtop ... 888#p50977,
and the proposed workaround, we deleted all printer definitions on the web server,
and then the 60-second load delay no longer occurred when we used the browser as the client.
We will propose this to our customers although it is unlikely to be feasible in all installations.
Any other news from you on reproducing and/or fixing the issue in TeeChart7 ?
Following the similarity of this issue http://www.teechart.net/support/viewtop ... 888#p50977,
and the proposed workaround, we deleted all printer definitions on the web server,
and then the 60-second load delay no longer occurred when we used the browser as the client.
We will propose this to our customers although it is unlikely to be feasible in all installations.
Any other news from you on reproducing and/or fixing the issue in TeeChart7 ?
Re: CreateObject takes a full minute in ASP
Hello,
Very interesting, sorry for the inconvenience that this has caused. We'll prepare an update fix applying the resolution we are making for the similar issue reported in v8/v2010 (http://www.teechart.net/support/viewtop ... 888#p50977). We don't yet have all feedback in to know that the fix applied works in all circumstances but the cause-effect-environment relationship is very similar and we are working to close the issue. It may be a few days before we're ready. We'll post an announcement to this thread when the download is available.
regards,
Marc
Very interesting, sorry for the inconvenience that this has caused. We'll prepare an update fix applying the resolution we are making for the similar issue reported in v8/v2010 (http://www.teechart.net/support/viewtop ... 888#p50977). We don't yet have all feedback in to know that the fix applied works in all circumstances but the cause-effect-environment relationship is very similar and we are working to close the issue. It may be a few days before we're ready. We'll post an announcement to this thread when the download is available.
regards,
Marc