Borland.Vcl.EOutOfResources: Not enough timers available

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
benlaan
Posts: 3
Joined: Wed 05 Jul 2006 01:05

Borland.Vcl.EOutOfResources: Not enough timers available

Post by benlaan » Fri 11 Apr 2008 03:19

We are receiving this error when we run a load test on our back end web service. This service use SDAC.NET extensively. We have used it for several years without error, but this load test has surfaced it now.

I have used Aisto's Reflector to view the source at the constructor of TCustomMSDataSet where the error is occurring, and it is indicates that this TTimer instance is created within a method called in the constructor (ChecktAutoRefreshTimer [sic], if the Options.AutoRefresh flag is True. This setting is never true in our code, so I don't see how it could be flagged as true. I have checked the Stored Proc properties after construction, and it is still false. How can this code be executed?

So, I have a few questions:

a) Why is the timer being created when it is not required? Could this be occuring some other way?

b) Why does creating a TTimer run of out resources under heavy (simulated) load? Aren't these TTimers freed correctly?

(Note: the load testing was done by an independent 3rd party, so I don't have any real details about how this occured).

c) Has anyone else (Core Labs, users?) experienced this before?

Thanks

Ben

--

The stack trace is as follows:

...

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. --->
Borland.Vcl.EOutOfResources: Not enough timers available
at Borland.Vcl.TTimer.UpdateTimer()
at Borland.Vcl.TTimer.SetOnTimer(TNotifyEvent Value)
at Borland.Vcl.TTimer.set_OnTimer(TNotifyEvent Value)
at CoreLab.Sdac.TCustomMSDataSet..ctor(Component Owner)
at CoreLab.Sdac.TCustomMSStoredProc..ctor(Component Owner)
at CoreLab.Sdac.TMSStoredProc..ctor(Component Owner)
at HSL.Components.Data.ThslStoredProc..ctor(Component AOwner)
at System.Reflection.RuntimeConstructorInfo.InternalInvoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Borland.Vcl.TReader.CreateComponentFromType(@TClassComponentClass, Component Owner)
at Borland.Vcl.TReader.@112Classes$ReadComponent$CreateComponent($Unnamed8& $frame_TReader.ReadComponent, TReader Self)
at Borland.Vcl.TReader.ReadComponent(Component Component)
at Borland.Vcl.TReader.ReadDataInner(Component Instance)
at Borland.Vcl.TReader.ReadData(Component Instance)
at Borland.Vcl.TDataModule.ReadState(TReader Reader)
at Borland.Vcl.TReader.ReadRootComponent(Component Root)
at Borland.Vcl.TStream.ReadComponent(Component Instance)
at Borland.Vcl.Units.Classes.@801Classes$InternalReadComponentRes$ReadComponent(Component& Instance, Byte[] Buffer)
at Borland.Vcl.Units.Classes.@801Classes$InternalReadComponentRes$ReadComponent(Component& Instance, Byte[] Buffer)
at Borland.Vcl.Units.Classes.InternalReadComponentRes(String ResName, String BaseName, Assembly ResourceAssembly, Component& Instance)
at Borland.Vcl.Units.Classes.@901Classes$InitInheritedComponent$InitComponent($Unnamed21& $frame_InitInheritedComponent, @TClass ClassType)
at Borland.Vcl.Units.Classes.InitInheritedComponent(Component Instance, @TClass RootAncestor)
at Borland.Vcl.TDataModule..ctor(Component AOwner)

...

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 11 Apr 2008 09:51

The timer is created only if the AutoRefresh option is enabled. Our tests show that it is destroyed properly.

Try to reproduce this problem in a small test sample and send this sample to sdac*crlab*com.

Post Reply