IIS Server - COM+ Crashes

This is Interesting: Free IT Magazines  
Home > Archive > IIS Server > September 2005 > COM+ Crashes





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author COM+ Crashes
adeelahmad2@gmail.com

2005-09-16, 6:00 pm

Hi,
I have an application running in production on Windows 2003 Server and
SQL Server 2000 (clustered). The app server is hosting my COM+ dll
which is being called by ASP 3 pages. Its an Intranet application.
What happens is: suddenly users get themselves out of the system and
unable to get back because it throws the error:
"Connection cannot be used to perform this operation. It is either
closed or Invalid in this context".

Now this error occurs when you try to use the database connection which
is closed. And if the connection is closed, even then it should not be
closed for all the users and even for new requests it should issue open
a connection if its closed.

Its not frequent error and happens twice this month in 15 days. The
only solution to this problem is going to COM+ Applications and
shutdown then Restart the dll. As its a production server so its not
easy to repeat the process.

I have reviewed the event logs and nothing suspisous has been found
except everytime first Secli Surity Policy applied event is found and
after that application stops bahaving in this fashion.

Any help would be highly appreciated.
Thanks,
adeel

Pat [MSFT]

2005-09-16, 6:00 pm

By crash, do you mean that the processs (DLLHost) is terminating? If so,
you should debug it and see what the issue is. You can use IISState:

iisstate -p <pid of DLLHost> -sc <enter>

Pat

<adeelahmad2@gmail.com> wrote in message
news:1126882937.053211.37560@z14g2000cwz.googlegroups.com...
> Hi,
> I have an application running in production on Windows 2003 Server and
> SQL Server 2000 (clustered). The app server is hosting my COM+ dll
> which is being called by ASP 3 pages. Its an Intranet application.
> What happens is: suddenly users get themselves out of the system and
> unable to get back because it throws the error:
> "Connection cannot be used to perform this operation. It is either
> closed or Invalid in this context".
>
> Now this error occurs when you try to use the database connection which
> is closed. And if the connection is closed, even then it should not be
> closed for all the users and even for new requests it should issue open
> a connection if its closed.
>
> Its not frequent error and happens twice this month in 15 days. The
> only solution to this problem is going to COM+ Applications and
> shutdown then Restart the dll. As its a production server so its not
> easy to repeat the process.
>
> I have reviewed the event logs and nothing suspisous has been found
> except everytime first Secli Surity Policy applied event is found and
> after that application stops bahaving in this fashion.
>
> Any help would be highly appreciated.
> Thanks,
> adeel
>



Adeel Ahmad

2005-09-18, 5:54 pm

NO.
Infact it hangs. As per my understanding, if the dll goes down, any
request call should wake it up. But in this case we have to go and
shutdown/Start the application manually from Component Services.
My IIS is running under Integrated Windows Authentication.
I am using ADODB connection
"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=" & strDB & ";Data Source=" & strServerName
& ""

And I have checked DTC on DB Server end and there is no event that it
has turnd down.

Adeel

Steve Schofield

2005-09-18, 5:54 pm

I would verify in the application when exceptions happened, the app is
correctly closing the connection and not still trying to do stuff.. When
this error occurs, have you seen if there are a lot of 'sleeping'
connections on the database. Just an idea

Another ide is the app is still trying to do something and the connection
has been closed. If they have an object that is handling all the connections
within the application this might be called and closing the connection
affecting the other parts of the app.

Steve


<adeelahmad2@gmail.com> wrote in message
news:1126882937.053211.37560@z14g2000cwz.googlegroups.com...
> Hi,
> I have an application running in production on Windows 2003 Server and
> SQL Server 2000 (clustered). The app server is hosting my COM+ dll
> which is being called by ASP 3 pages. Its an Intranet application.
> What happens is: suddenly users get themselves out of the system and
> unable to get back because it throws the error:
> "Connection cannot be used to perform this operation. It is either
> closed or Invalid in this context".
>
> Now this error occurs when you try to use the database connection which
> is closed. And if the connection is closed, even then it should not be
> closed for all the users and even for new requests it should issue open
> a connection if its closed.
>
> Its not frequent error and happens twice this month in 15 days. The
> only solution to this problem is going to COM+ Applications and
> shutdown then Restart the dll. As its a production server so its not
> easy to repeat the process.
>
> I have reviewed the event logs and nothing suspisous has been found
> except everytime first Secli Surity Policy applied event is found and
> after that application stops bahaving in this fashion.
>
> Any help would be highly appreciated.
> Thanks,
> adeel
>



Adeel Ahmad

2005-09-19, 2:49 am

I have checked the code and its working fine. All connections are
closing and reopening properly.
Even then i have a question that even some part of my application is
using a closed connection. It should give error that "Connection is
closed or invalid...."
BUT why it appears for all the users and even trying to connect again
does not solve the problem. At login i make a new connection.

Pat [MSFT]

2005-09-19, 6:01 pm

I need some clarity:

Does a request that calls a method on the object not respond (hang)? Or
does it respond with an error?

I re-read your original post and it would seem that you are able to call
into the component but you then get a runtime error about security context.
What type of component is it? Apartment threaded/Free threaded? If it is
APT, how are you instantiating it in ASP? Are you storing any references in
Application or Session scope?


Pat




"Adeel Ahmad" <adeelahmad2@gmail.com> wrote in message
news:1127048098.658489.215080@g14g2000cwa.googlegroups.com...
> NO.
> Infact it hangs. As per my understanding, if the dll goes down, any
> request call should wake it up. But in this case we have to go and
> shutdown/Start the application manually from Component Services.
> My IIS is running under Integrated Windows Authentication.
> I am using ADODB connection
> "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
> Info=False;Initial Catalog=" & strDB & ";Data Source=" & strServerName
> & ""
>
> And I have checked DTC on DB Server end and there is no event that it
> has turnd down.
>
> Adeel
>



Adeel Ahmad

2005-09-20, 2:49 am

Hangs is my theory as it starts throwing same error to all users until
you shut down/restart the dll from COM+ Services. Its Windows 2003.
Yes you are right, the error keeps coming from the VB Dll.
Its an Apartment threading dll. Set for Unattended Execution.
No object is being stored in Session or Application. On each screen,
subsequent object gets created and destroyed afterwards.
In ASP i am using Set myObj = Server.CreateObject("myDll.myCls")
and then i am calling the functions of myCls.

And i have checked the event log which states,

Event Type: Information
Event Source: VBRuntime
Event Category: None
Event ID: 1
Description:
The VB Application identified by the event source logged this
Application LienRelease: Thread ID: 208 ,Logged: MsgBox: , Run-time
error '3704':

Operation is not allowed when the object is closed.

There is no other significant event to mention.

Pat [MSFT]

2005-09-20, 6:05 pm

When you set Unattended Execution, errors that would normally cause a
message box pop-up are re-directed to the event log (which prevents an
application hang). This is what has happened.

So, you have a VB-Runtime error (error occurring within MSVBVM60.dll) which
could be caused by lots of things:

If you are using SQL Server + Temp tables, this KB may apply: 235340

If there is a FW between IIS & SQL Server and it sends a TCP reset to IIS,
you may see this (it would cause the IIS<-->SQL connection to be terminated)

If your Stored Procedure is erroring out, you could see this

There were some bugs in MDAC 2.5 that caused it, but Win2k3 has all of those
fixes.


If none of those are the issue, then you should contact MS-Support.


"Adeel Ahmad" <adeelahmad2@gmail.com> wrote in message
news:1127196621.451703.151040@g44g2000cwa.googlegroups.com...
> Hangs is my theory as it starts throwing same error to all users until
> you shut down/restart the dll from COM+ Services. Its Windows 2003.
> Yes you are right, the error keeps coming from the VB Dll.
> Its an Apartment threading dll. Set for Unattended Execution.
> No object is being stored in Session or Application. On each screen,
> subsequent object gets created and destroyed afterwards.
> In ASP i am using Set myObj = Server.CreateObject("myDll.myCls")
> and then i am calling the functions of myCls.
>
> And i have checked the event log which states,
>
> Event Type: Information
> Event Source: VBRuntime
> Event Category: None
> Event ID: 1
> Description:
> The VB Application identified by the event source logged this
> Application LienRelease: Thread ID: 208 ,Logged: MsgBox: , Run-time
> error '3704':
>
> Operation is not allowed when the object is closed.
>
> There is no other significant event to mention.
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com