473,322 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

.NET Runtime Application Log Error, Server crashing due to .NET Er

I have a load balanced system that consists of 3 production servers. There
are about 20 different applications that are used on these boxes. One of my
applications in particular is used more than the others. Since updating 2
applications, I have had problems on the event log of the servers, following
stopping of the aspnet_ws.exe process.

Something is causing the following error in the windows application event log:

The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be
found. The local computer may not have the necessary registry information or
message DLL files to display messages from a remote computer. The following
information is part of the event: .NET Runtime version 1.1.4322.2032- Setup
Error: Failed to load resources from resource file

This is usually followed by the crashing of the aspnet_ws.exe process, which
will crash all users that are in any application on the server. This happens
about 3-8 times per day, at random times, with an absolute unknown cause for
this.

I have searched all over the net for help on this error, and I cannot find a
single answer that will fix this. I am thinking it is is something in my
code, but what is odd is that this error does NOT happen at anytime on our
test server or my local computer that uses the same application.

We test the application constantly on the test server, and no matter what,
the log never receives this error. It is possible that the reason for this
is the higher load on our production servers. There are usually 85 - 100
users simultaneously hitting the box.

Here is an example of the new stuff that has been added since I have been
starting to get that error. (Prior to adding this code, I have never seen
this error in the log.)

Code:

Imports System.Threading

Public Sub PostDocument
Dim ThreadPost As New Thread(New ThreadStart(AddressOf ExecutePost))
ThreadPost.Priority = ThreadPriority.Lowest
ThreadPost.Start()
End Sub

Public Sub ExecutePost()
Dim mut As Mutex = New Mutex
mut.WaitOne()
Try
Dim oHB As New HostBridgeLink(gsURL, "F400", UserID, Password,
Token)
oHB.ExecCmdWithData("PF10", "WEBIND=Y") : oHB.ExecCmd("PF8")
Catch ex As Exception
Finally
mut.ReleaseMutex()
End Try
End Sub

All of the above code works correctly in test, and production too. I am just
wondering if excessive use of any of the above at simultaneous times could
cause problems? Is there something I need to do to the server to handle the
Threading? Am I forgetting another step that will cause a problem on the
server?

I am using threading because the response time was very slow on our servers,
so I do not wait for a response. Its a new method I chose, and works
excellent, however, now the servers are still receiving that above message,
and the Memory usage does not even exceed 300K, whereas in the past, it used
to go all the way up to 900K when it crashed.

This is a major problem, and needs to be resolved fast.
Any help would be greatly appreciated. Thank you.

- Vincent
Jul 21 '05 #1
5 4632
"VinnieT" <Vi*****@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
I have a load balanced system that consists of 3 production servers. There
are about 20 different applications that are used on these boxes. One of
my
applications in particular is used more than the others. Since updating 2
applications, I have had problems on the event log of the servers,
following
stopping of the aspnet_ws.exe process.

Something is causing the following error in the windows application event
log:

The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be
found. The local computer may not have the necessary registry information
or
message DLL files to display messages from a remote computer. The
following
information is part of the event: .NET Runtime version 1.1.4322.2032-
Setup
Error: Failed to load resources from resource file

This is usually followed by the crashing of the aspnet_ws.exe process,
which
will crash all users that are in any application on the server. This
happens
about 3-8 times per day, at random times, with an absolute unknown cause
for
this.

I have searched all over the net for help on this error, and I cannot find
a
single answer that will fix this. I am thinking it is is something in my
code, but what is odd is that this error does NOT happen at anytime on our
test server or my local computer that uses the same application.

We test the application constantly on the test server, and no matter what,
the log never receives this error. It is possible that the reason for
this
is the higher load on our production servers. There are usually 85 - 100
users simultaneously hitting the box.

Here is an example of the new stuff that has been added since I have been
starting to get that error. (Prior to adding this code, I have never seen
this error in the log.)

Code:
Where is this code being executed from? You mentioned aspnet_wp, so, is this
being executed from an ASP.NET application?
Imports System.Threading

Public Sub PostDocument
Dim ThreadPost As New Thread(New ThreadStart(AddressOf
ExecutePost))
ThreadPost.Priority = ThreadPriority.Lowest
ThreadPost.Start()
End Sub

Public Sub ExecutePost()
Dim mut As Mutex = New Mutex
mut.WaitOne()
Try
Dim oHB As New HostBridgeLink(gsURL, "F400", UserID, Password,
Token)
oHB.ExecCmdWithData("PF10", "WEBIND=Y") : oHB.ExecCmd("PF8")
Catch ex As Exception
Why in the world would you want to eat every exception that this code might
possibly throw? Especially when you tell us you're getting crashes?

How about at least saving the exception details (from ex.ToString()) into
the event log or something?
Finally
mut.ReleaseMutex()
End Try
End Sub

All of the above code works correctly in test, and production too. I am
just
wondering if excessive use of any of the above at simultaneous times could
cause problems? Is there something I need to do to the server to handle
the
Threading? Am I forgetting another step that will cause a problem on the
server?


Have you looked at the performance counters to see how many threads are
being used?

John Saunders
Jul 21 '05 #2
> > "Where is this code being executed from? You mentioned aspnet_wp, so, is
this being executed from an ASP.NET application?"

-- yes, this code is being executed from an asp.net web application
"Why in the world would you want to eat every exception that this code might possibly throw? Especially when you tell us you're getting crashes? How
about at least saving the exception details (from ex.ToString()) into the
event log or something?"

-- I agree, that is a good suggestion, and I will add that to my code. I
may write the exception to a text file though so I can seperate the errors
from the event log.
"Have you looked at the performance counters to see how many threads are
being used?"

-- I am looking at the perfmon, but by looking at the thread monitor, I do
not know what to look for. I am not familiar with the type of settings that
are required on the server to handle threads from multiple users accessing
the same application simultaneously. I will keep an eye on the thread
monitor, and see if any of that information helps at all. Is there something
on the server I need to adjust based on the level of users that hit this
thread? Perhaps machine.config, or web.config in the application? Do you see
anything in my code that could cause such an error from occurring in the
application event log? Thank you

-Vincent
--------------------------------------------------------------------
"John Saunders" wrote:
"VinnieT" <Vi*****@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
I have a load balanced system that consists of 3 production servers. There
are about 20 different applications that are used on these boxes. One of
my
applications in particular is used more than the others. Since updating 2
applications, I have had problems on the event log of the servers,
following
stopping of the aspnet_ws.exe process.

Something is causing the following error in the windows application event
log:

The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be
found. The local computer may not have the necessary registry information
or
message DLL files to display messages from a remote computer. The
following
information is part of the event: .NET Runtime version 1.1.4322.2032-
Setup
Error: Failed to load resources from resource file

This is usually followed by the crashing of the aspnet_ws.exe process,
which
will crash all users that are in any application on the server. This
happens
about 3-8 times per day, at random times, with an absolute unknown cause
for
this.

I have searched all over the net for help on this error, and I cannot find
a
single answer that will fix this. I am thinking it is is something in my
code, but what is odd is that this error does NOT happen at anytime on our
test server or my local computer that uses the same application.

We test the application constantly on the test server, and no matter what,
the log never receives this error. It is possible that the reason for
this
is the higher load on our production servers. There are usually 85 - 100
users simultaneously hitting the box.

Here is an example of the new stuff that has been added since I have been
starting to get that error. (Prior to adding this code, I have never seen
this error in the log.)

Code:


Where is this code being executed from? You mentioned aspnet_wp, so, is this
being executed from an ASP.NET application?
Imports System.Threading

Public Sub PostDocument
Dim ThreadPost As New Thread(New ThreadStart(AddressOf
ExecutePost))
ThreadPost.Priority = ThreadPriority.Lowest
ThreadPost.Start()
End Sub

Public Sub ExecutePost()
Dim mut As Mutex = New Mutex
mut.WaitOne()
Try
Dim oHB As New HostBridgeLink(gsURL, "F400", UserID, Password,
Token)
oHB.ExecCmdWithData("PF10", "WEBIND=Y") : oHB.ExecCmd("PF8")
Catch ex As Exception


Why in the world would you want to eat every exception that this code might
possibly throw? Especially when you tell us you're getting crashes?

How about at least saving the exception details (from ex.ToString()) into
the event log or something?
Finally
mut.ReleaseMutex()
End Try
End Sub

All of the above code works correctly in test, and production too. I am
just
wondering if excessive use of any of the above at simultaneous times could
cause problems? Is there something I need to do to the server to handle
the
Threading? Am I forgetting another step that will cause a problem on the
server?


Have you looked at the performance counters to see how many threads are
being used?

John Saunders

Jul 21 '05 #3
"VinnieT" <Vi*****@discussions.microsoft.com> wrote in message
news:C9**********************************@microsof t.com...
> "Where is this code being executed from? You mentioned aspnet_wp, so,
> is this being executed from an ASP.NET application?"

-- yes, this code is being executed from an asp.net web application


You have to be very careful when using multiple threads in an ASP.NET
appliction. More careful than in other applications. This is because, if you
start a thread during a request, chances are that the request will have
completed before the thread completes. This may leave the thread accessing
invalid data and disposed objects.
> "Why in the world would you want to eat every exception that this code
> might possibly throw? Especially when you tell us you're getting crashes? How
about at least saving the exception details (from ex.ToString()) into the
event log or something?"

-- I agree, that is a good suggestion, and I will add that to my code. I
may write the exception to a text file though so I can seperate the errors
from the event log.


Take a look at System.Diagnostics.EventLog. You'll see that you can write
the errors under their own event source.
> "Have you looked at the performance counters to see how many threads
> are

being used?"

-- I am looking at the perfmon, but by looking at the thread monitor, I
do
not know what to look for. I am not familiar with the type of settings
that
are required on the server to handle threads from multiple users accessing
the same application simultaneously. I will keep an eye on the thread
monitor, and see if any of that information helps at all. Is there
something
on the server I need to adjust based on the level of users that hit this
thread? Perhaps machine.config, or web.config in the application? Do you
see
anything in my code that could cause such an error from occurring in the
application event log? Thank you

The performance counter I was talking about is simply the number of threads.

John Saunders
Jul 21 '05 #4
John,

I run this code over 100 times on our test servers and not one time did I
encounter this error. Evidentally, the code works correctly. The only
difference of our test server and our production server is the volume of
users that are executing the code simultaneously. If what you said is true,
what would I do to fix this? Is there a way to prevent destruction of
objects prior ot completion of the thread? Everywhere I look on the internet
and in books, my threading code is correct as is. Is there something I need
to do to fix this on the server or in the code?

I was considering calling Microsoft to help us fix this. This is a major
problem that has just recently started to happen, but I was hoping I could
get answers through this message board prior to calling up microsoft. Would
you suggest that I call Microsoft? Thank you -Vincent
"John Saunders" wrote:
"VinnieT" <Vi*****@discussions.microsoft.com> wrote in message
news:C9**********************************@microsof t.com...
> "Where is this code being executed from? You mentioned aspnet_wp, so,
> is

this being executed from an ASP.NET application?"

-- yes, this code is being executed from an asp.net web application


You have to be very careful when using multiple threads in an ASP.NET
appliction. More careful than in other applications. This is because, if you
start a thread during a request, chances are that the request will have
completed before the thread completes. This may leave the thread accessing
invalid data and disposed objects.
> "Why in the world would you want to eat every exception that this code
> might

possibly throw? Especially when you tell us you're getting crashes? How
about at least saving the exception details (from ex.ToString()) into the
event log or something?"

-- I agree, that is a good suggestion, and I will add that to my code. I
may write the exception to a text file though so I can seperate the errors
from the event log.


Take a look at System.Diagnostics.EventLog. You'll see that you can write
the errors under their own event source.
> "Have you looked at the performance counters to see how many threads
> are

being used?"

-- I am looking at the perfmon, but by looking at the thread monitor, I
do
not know what to look for. I am not familiar with the type of settings
that
are required on the server to handle threads from multiple users accessing
the same application simultaneously. I will keep an eye on the thread
monitor, and see if any of that information helps at all. Is there
something
on the server I need to adjust based on the level of users that hit this
thread? Perhaps machine.config, or web.config in the application? Do you
see
anything in my code that could cause such an error from occurring in the
application event log? Thank you

The performance counter I was talking about is simply the number of threads.

John Saunders

Jul 21 '05 #5
"VinnieT" <Vi*****@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
John,

I run this code over 100 times on our test servers and not one time did
I
encounter this error. Evidentally, the code works correctly.
Where a multithreaded program is concerned, the repeated success of a test
is not a good measure of code correctness. I've seem problems which
literally could not be reproduced except on 8-CPU systems! You could try
forever on a 4-CPU system and you would never reproduce the problem.
The only
difference of our test server and our production server is the volume of
users that are executing the code simultaneously.
Do they both use identical hardware? Especially number of CPUs and amount of
physical memory? If disk I/O is involved at all, do they both have the same
disks on the same disk controllers with similar levels of fragmentation?

Murphy wrote his famous Law to warn about multithreaded applications. Any
sequence of events which is not impossible will happen. Much of the "trick"
of programming threads involves making unfortunate things impossible through
synchronization.
If what you said is true,
what would I do to fix this? Is there a way to prevent destruction of
objects prior ot completion of the thread? Everywhere I look on the
internet
and in books, my threading code is correct as is. Is there something I
need
to do to fix this on the server or in the code?
Yes. Don't use Threading in ASP.NET applications.

Did I post this link before?

The ASP.NET Page Object Model
(http://msdn.microsoft.com/library/de...asp?frame=true)
And if I posted it, did you read it? An ASP.NET application follows a
fundamentally different lifecycle than, say, a Windows Forms application or
even a Windows Service. The HttpContext and all it references, the Page and
all it references do not belong to you. In particular, you do not have
control over their lifecycle. When the request is over, the resources
associated with it should be considered to be invalid.
I was considering calling Microsoft to help us fix this. This is a
major
problem that has just recently started to happen, but I was hoping I could
get answers through this message board prior to calling up microsoft.
Would
you suggest that I call Microsoft? Thank you -Vincent


No, I'd suggest that you either re-engineer your code with an understanding
of the ASP.NET page object model, or else move this troublesome code out of
ASP.NET. There's nothing wrong with an ASP.NET application queueing a
request to a server application which would have this multithreaded code in
it.

John Saunders

P.S. This may not actually be the source of your problem. Moving the
multithreaded code out to a separate process would be one way to confirm
this. If it works in a separate process, then perhaps the problem was the
process it was running in (aspnet_wp).

Another way would be to have the ASP.NET code wait for the completion of all
the threads. This won't work in production, but might be a useful diagnostic
technique. If it works when the page waits for completion, then maybe the
problem was that the code requires the page in order to work correctly.
Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Hemant | last post by:
Why i am getting this error. Server Error in '/' Application Runtime error Please help me out. Thank you
2
by: m11533 | last post by:
I have written an application that runs as a subprocess of a service, where the service is a .NET C# Windows Service that simply starts the subprocess and then periodically checks that the subprocess...
3
by: Damian | last post by:
Hi everyone I'm having an issue with one of our applications. I'm getting the following error when attempting to log in to the site: Server Error in 'xxxxxxxxxxxxxxxx' Application....
12
by: Kevin Farless | last post by:
Hi all, I'm having trouble viewing any .aspx pages on my hosting company's server. The server is a new box running Windows Server 2003 default installation. I'm the first client to try using...
6
by: Rich Wallace | last post by:
Hi all, I have a VB app that runs and manages individual XLS files within a single COM object. Upon processing the final fie, I attempt to close out the EXCEL object and release it using...
6
by: VinnieT | last post by:
I have a load balanced system that consists of 3 production servers. There are about 20 different applications that are used on these boxes. One of my applications in particular is used more than...
4
by: David Lozzi | last post by:
Howdy, I found a nice little book called ASP.NET 2.0 Cookbook by Michael A Kittel and Geoffrey LeBlond. Anyway, they have some instructions on how to setup application level error handling. Most...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.