Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

3329

December 7th, 2009 08:00

Pool Connection loss leads to high CPU utilization

Hi all

I have noticed that our applications ApplicationAudit and AdvancedRecovery generate a high CPU utilization after the connection to the pool has been lost.

Are there any best practices on how to handle this? The threads themself do not seem to re-connect or anything. Hints and suggestions are appreciated.

Our development environment is .NET in CSharp using SDK 3.2SP4 and CentraStar 4.0.2.

Thanks a lot, Holger

417 Posts

December 9th, 2009 01:00

Are you using C / C++ / Java?

If it is either of the latter I would suggest building a singleton class to wrap the FPPool object. Within this class you would have static Instance and Invalidate methods. Elsewhere in the code you would obtain the FPPool reference using the Instance method (which would create a new one if a connection string is supplied as a parameter or the existing one is marked as invalid). Similarly, if you received an error related to the connection you would call the Invalidate method (which could optionally create a new connection).

Things are not as easy in C as you have to pass a structure containing the relevant details into each thread's user data, but it can still be modelled in this way using function pointers.

417 Posts

December 8th, 2009 02:00

If you lose connection to the pool then errors will be generated for any transactions that access the cluster. The Best Practice would be to attempt to open a new Pool connection a limited number of times (in the order of 5-10) before returning failure to the application. After a period of time has elapsed - or the problem has been rectified (typically network or maintenance issues) - you would then repeat the attempt to establish a connection.

December 8th, 2009 05:00

Hi Graham

It seems that the thread pool are having troubles giving the errors back to the process who feeds the queue and maintains the global pool connection. Any idea on how to improve this?

Thanks, Holger

417 Posts

December 9th, 2009 02:00

Indeed you are - you mentioned that in the first part of the post. Doh!

C# should follow the C++ / Java recommendation.

December 9th, 2009 02:00

Hi Graham

I'll pass your suggestions on to the developer. We are using C-Sharp in our .NET environment to code.

Best regards, Holger

No Events found!

Top