I have two ATL Dlls that have multiple interfaces and run under two COM+
Applications. Each DLL accesses SQL Server db via ADO calls and one of
the components also interacts with a 3rd party report server system.
We run into intermittent issues with the COM+ Application hanging. Our
client application will go into the tank and checking Component Services
will show that the max call time is very high and just keeps climbing.
Recycling the COM+ Application will typically fix the problem as it clears
out all memory, connections etc.
I'm struggling to figure out if our components have a bug in them or if
there is something flakey about COM+ Applications and perhaps DB Connection
Pooling.
What would cause one instance to hang and then block all other calls to a
COM+ Application?
Are there any good tools that can hack inside the low-level calls and show
what's causing the bottleneck?
Any help would be greatly appreciated. This is driving me nuts as it's
like finding a needle in a haystack.
Thanks
Eric"Eric Margheim" <NOSPAM***eric@.prism-grp.com***NOSPAM> wrote in message
news:u%23op52m1FHA.460@.TK2MSFTNGP15.phx.gbl...
>I have two ATL Dlls that have multiple interfaces and run under two COM+
> Applications. Each DLL accesses SQL Server db via ADO calls and one of
> the components also interacts with a 3rd party report server system.
> We run into intermittent issues with the COM+ Application hanging. Our
> client application will go into the tank and checking Component Services
> will show that the max call time is very high and just keeps climbing.
> Recycling the COM+ Application will typically fix the problem as it clears
> out all memory, connections etc.
> I'm struggling to figure out if our components have a bug in them or if
> there is something flakey about COM+ Applications and perhaps DB
> Connection
> Pooling.
This is very typical of a buggy COM+ DLL which fails to return for whatever
reason.
> What would cause one instance to hang and then block all other calls to a
> COM+ Application?
>
There are a gazillion reasons. There is simply insufficient information
provided to hazard a guess what is responsible in your case.
> Are there any good tools that can hack inside the low-level calls and show
> what's causing the bottleneck?
>
Having gone down this road several times myself, I've simply used standard
debugging strategies. In my design, I have built-in tracing designed as part
of the COM+ DLL's that can be turned on or off by a simply registry setting.
This produces log messages stored in a log file for analysis in case these
situations arises. This can provide a lot of insight as to what is
happening.
I really can't be more specific given the limited amount of information you
have posted, but hopefully this will keep you from going off on a tangent
and blaming the COM+ infrastructure, when it fact it is really solid (at
least in my experience).
Brian|||"Brian Muth" <bmuth@.mvps.org> wrote in message
news:#Updhbn1FHA.904@.tk2msftngp13.phx.gbl...
> "Eric Margheim" <NOSPAM***eric@.prism-grp.com***NOSPAM> wrote in message
> news:u%23op52m1FHA.460@.TK2MSFTNGP15.phx.gbl...
of
clears
> This is very typical of a buggy COM+ DLL which fails to return for
whatever
> reason.
>
a
> There are a gazillion reasons. There is simply insufficient information
> provided to hazard a guess what is responsible in your case.
>
show
> Having gone down this road several times myself, I've simply used standard
> debugging strategies. In my design, I have built-in tracing designed as
part
> of the COM+ DLL's that can be turned on or off by a simply registry
setting.
> This produces log messages stored in a log file for analysis in case these
> situations arises. This can provide a lot of insight as to what is
> happening.
> I really can't be more specific given the limited amount of information
you
> have posted, but hopefully this will keep you from going off on a tangent
> and blaming the COM+ infrastructure, when it fact it is really solid (at
> least in my experience).
> Brian
>
Thanks for the response Brian. I am not necessarily blaming the COM+
infrastructure. Just trying to make sense of this. We have recently put
in a bunch of code to try to handle all error conditions and exceptions and
are logging them. So far nothing shows up in our logs except a sesation of
logging anything until the application is shutdown and restarted.
We have two different dlls written by different people. The commonality is
they use ADO to talk to SQL Server 2000. I can't reproduce the error in
our test environment and it doesn't happen on all of our systems and is
sporadic but very annoying.
I think what I need are tools so that when it happens I can figure out where
it's occuring and why. I also need to understand the subsystem better.
What would cause the whole application to hang if only one instance of the
component had issues? Could there be a problem with SQL Connections?
The database typically looks fine when this occurs so I don't think it's a
db call that is hanging in SQL.|||>
> What would cause the whole application to hang if only one instance of the
> component had issues?
You mean you want an example? Ok, if the COM+ object requires a transaction,
then all it takes is for one object to fail or hang, and all subsequent
calls are blocked.
Could there be a problem with SQL Connections?
What sort of problem are you thinking of?
Brian|||attach a debugger to the hang process and check all thread call
stack should be a fast way to check which thread makes a blocking call.
if this issue has a considerable business impact, i suggest you
submit a service request to Microsoft PSS to ask them for assistance.
"Eric Margheim" <NOSPAM***eric@.prism-grp.com***NOSPAM> д? news:u%23op5
2m1FHA.460@.TK2MSFTNGP15.phx.gbl...
I have two ATL Dlls that have multiple interfaces and run under two COM+
Applications. Each DLL accesses SQL Server db via ADO calls and one of
the components also interacts with a 3rd party report server system.
We run into intermittent issues with the COM+ Application hanging. Our
client application will go into the tank and checking Component Services
will show that the max call time is very high and just keeps climbing.
Recycling the COM+ Application will typically fix the problem as it clears
out all memory, connections etc.
I'm struggling to figure out if our components have a bug in them or if
there is something flakey about COM+ Applications and perhaps DB Connection
Pooling.
What would cause one instance to hang and then block all other calls to a
COM+ Application?
Are there any good tools that can hack inside the low-level calls and show
what's causing the bottleneck?
Any help would be greatly appreciated. This is driving me nuts as it's
like finding a needle in a haystack.
Thanks
Eric|||John, thanks for the response. I probably will be calling MS. I'm not
sure how to attach a debugger in this production environment. Are you
referring to a stand-alone debugging tool that'll work outside of the
development environment.
"John" <lanxiaowei@.hotmail.com> wrote in message
news:OdXBhw#1FHA.2008@.TK2MSFTNGP10.phx.gbl...
attach a debugger to the hang process and check all thread call
stack should be a fast way to check which thread makes a blocking call.
if this issue has a considerable business impact, i suggest you
submit a service request to Microsoft PSS to ask them for assistance.
"Eric Margheim" <NOSPAM***eric@.prism-grp.com***NOSPAM> д?
news:u%23op52m1FHA.460@.TK2MSFTNGP15.phx.gbl...
I have two ATL Dlls that have multiple interfaces and run under two COM+
Applications. Each DLL accesses SQL Server db via ADO calls and one of
the components also interacts with a 3rd party report server system.
We run into intermittent issues with the COM+ Application hanging. Our
client application will go into the tank and checking Component Services
will show that the max call time is very high and just keeps climbing.
Recycling the COM+ Application will typically fix the problem as it clears
out all memory, connections etc.
I'm struggling to figure out if our components have a bug in them or if
there is something flakey about COM+ Applications and perhaps DB
Connection
Pooling.
What would cause one instance to hang and then block all other calls to a
COM+ Application?
Are there any good tools that can hack inside the low-level calls and show
what's causing the bottleneck?
Any help would be greatly appreciated. This is driving me nuts as it's
like finding a needle in a haystack.
Thanks
Eric|||"Brian Muth" <bmuth@.mvps.org> wrote in message
news:O2bKUOp1FHA.1032@.TK2MSFTNGP12.phx.gbl...
the
> You mean you want an example? Ok, if the COM+ object requires a
transaction,
> then all it takes is for one object to fail or hang, and all subsequent
> calls are blocked.
>
But that would only be from the same client, correct? If a different
client with a different handle to the interface makes a call shouldn't it
have it's own process flow?
> Could there be a problem with SQL Connections?
> What sort of problem are you thinking of?
>
Just wondering if there could be some sort of blocking or threading issue
that would cause all SQL connections (since there is pooling going on) to be
blocked so any calls made to the components would "hang" because they are
primarliy doing db calls via ADO.|||"Eric Margheim" <NOSPAM***eric@.prism-grp.com***NOSPAM> wrote in message
news:u%23op52m1FHA.460@.TK2MSFTNGP15.phx.gbl...
>I have two ATL Dlls that have multiple interfaces and run under two COM+
> Applications. Each DLL accesses SQL Server db via ADO calls and one of
> the components also interacts with a 3rd party report server system.
> We run into intermittent issues with the COM+ Application hanging. Our
> client application will go into the tank and checking Component Services
> will show that the max call time is very high and just keeps climbing.
> Recycling the COM+ Application will typically fix the problem as it clears
> out all memory, connections etc.
> I'm struggling to figure out if our components have a bug in them or if
> there is something flakey about COM+ Applications and perhaps DB
> Connection
> Pooling.
> What would cause one instance to hang and then block all other calls to a
> COM+ Application?
> Are there any good tools that can hack inside the low-level calls and show
> what's causing the bottleneck?
> Any help would be greatly appreciated. This is driving me nuts as it's
> like finding a needle in a haystack.
Have you considered the possibility of a SQL deadlock? Execute sp_who2 when
the condition occurs again, to see if your [SQL] process is being blocked by
another. If that is the case, you can use Enterprise Manager
(Management->Current Activity->Process Info) to investigate further. From
there, by double-clicking a process item, you can [usually] view the last
SQL statement executed. From there you may or may not have your work cut
out for you, depending on the circumstances, of course.
-Mark
[non-relevant cross-posts removed]
> Thanks
> Eric
>|||Response inline...
Michael D. Long
"Eric Margheim" <NOSPAM***eric@.prism-grp.com***NOSPAM> wrote in message
news:u%23op52m1FHA.460@.TK2MSFTNGP15.phx.gbl...
> What would cause one instance to hang and then block all other calls to a
> COM+ Application?
>
When operating against the DBMS at Read Serializable isolation, a long
running transaction that acquires an exclusive lock on a single data row
will block all other connections accessing the same data row. For that
reason, when developing COM+ applications the developer needs to be
intimately familiar with database locking behavior and data usage patterns.
I saw one guy try to avoid a scalability issue by creating a connection
outside of the scope of the distributed transaction in an effort to improve
performance on a system designed by another team that was bottlenecked at 8
concurrent users. This approach managed to "intermittently" deadlock the
entire application, because the non-transactional connection was contending
with the connection enlisted in the distributed transaction for the same
data row - and his internal recovery logic kept retrying until the object
was terminated.
> Are there any good tools that can hack inside the low-level calls and show
> what's causing the bottleneck?
>
If this is a data related bottleneck you can run a trace of the activity. A
thorough design review wouldn't hurt - this should include validation of the
data access patterns as well as line by line source code walk through.|||"Mark J. McGinty" <mmcginty@.spamfromyou.com> wrote in message
news:#InvFiS2FHA.3244@.tk2msftngp13.phx.gbl...
> "Eric Margheim" <NOSPAM***eric@.prism-grp.com***NOSPAM> wrote in message
> news:u%23op52m1FHA.460@.TK2MSFTNGP15.phx.gbl...
of
clears
a
show
> Have you considered the possibility of a SQL deadlock? Execute sp_who2
when
> the condition occurs again, to see if your [SQL] process is being blocked
by
> another. If that is the case, you can use Enterprise Manager
> (Management->Current Activity->Process Info) to investigate further. From
> there, by double-clicking a process item, you can [usually] view the last
> SQL statement executed. From there you may or may not have your work cut
> out for you, depending on the circumstances, of course.
>
Thanks Mark. Yes I have considered that. Whenever this occurs I have the
db team look at SQL. Sometimes our problem is with database load/locking
but in the cases I'm trying to debug the database is quiet.