Solved

COM+ Services, ADO, Clustered Invironment.

Posted on 2002-07-27
5
466 Views
Last Modified: 2013-11-15
I'm having problem with COM+ Services failing after three or four days running with an application using ADO in a clustered invironment.  

This happens every 3 to 4 days and when we fail it over, it works for 3 to 4 more days..  What happens is ADO can't connect to the SQL server that is on the same machine as the application.  I'm using a trusted connection string to connect to SQL using OLEDB.  This cluster has around 200GB total storage on an array.  Can anyone help me here.  Am I doing something wrong in my C++ app connecting to ADO?

Error found in Event Viewer.
======================================
The COM+ Services DLL (comsvcs.dll) was unable to load because allocation of thread local storage failed.

Process Name: CDE.exe
Error Code = 0x80070008 : Not enough storage is available to process this command.
COM+ Services Internals Information:
File: .\comsvcs.cpp, Line: 289
======================================

I'm #import "location\\ado...etc.." (no_namespace)
I'm not where the code is so I don't know off hand the full location of the ADO DLL, but it's in the code.

I'm using GetRows get get my data..

Using SafeArrays to hold my data as I use it..

I'm kind of throwing these things out there, just in case I don't know something about Clusters and using these different things together causing problems or not.
0
Comment
Question by:Chizl
  • 3
  • 2
5 Comments
 
LVL 4

Author Comment

by:Chizl
ID: 7182371
BTW..  I don't need COM+, not even developed to use COM+, just seems to be there for Win2K..   If I can turn that off and use ADO direct, that would work for me just as well.
0
 
LVL 22

Expert Comment

by:ambience
ID: 7184402
a problem with releasing resources ?
0
 
LVL 4

Author Comment

by:Chizl
ID: 7185565
Shouldn't be..   I'm doing a

oRS.Release()
and
oConn.Release()

after every connection.   I'm only in the connection for a few milliseconds.   One function opens the connection, executes the SQL statement, then uses GetRows, closes recordset, closes connection, then releases both.  

The application running this execution is a winsock app.  It's still running strong far after COM+ dies and SQL connections are failing.
0
 
LVL 22

Accepted Solution

by:
ambience earned 500 total points
ID: 7187029
I had such a problem fairly long ago, but it ended up being due to memory leaks, and stragely enough WinNT 4.0 didnt seem to have it but only on Win2k the service used to crash after 30 odd hours or so.

Maybe you should check if the application is leaking memory, possible case can be results returned by GetRows. I am failing to recall the link but there is a mention somewhere that COM+ can hadle such crashes and re-start the service after it has crashed etc.

maybe this is of some help..
0
 
LVL 4

Author Comment

by:Chizl
ID: 7188809
Yea, I had talked to Microsoft yesterday and that is what they thought it may be.  There was a leak and it was because of the location of my CoInit..().

The CoInit was called each time a transaction came in, before using ADO, then CoUninit was called.

I moved CoInit to be called on startup of the application and CoUninit on the closing of the application, and the memory leak went away.

Thanx for the help though..  Guess I will give you the points..  hehe  Easy 500 huh?
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Create your own, high-performance VM backup appliance by installing NAKIVO Backup & Replication directly onto a Synology NAS!
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question