Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

We have a server in a web farm, on the server we have a particular web service running that has two methods. One of those methods (StartProcessing()) is responsible for connecting to a database and clearing all the data out of a particular table when it is called.

 

On the same server we have a windows service that is build around a timer, it should run every 5 minutes and call the method StartProcessing() and go to sleep for another 5 minutes before repeating the task.

 

The problem that we are having is that every couple of days the entire system goes down i.e. the windows service fails to call the web service. When we check the server, both the windows and web service appear to be working correctly. I most cases to fix the problem all we have to do is to restart the windows service. In the worst case scenario, we would also restart IIS and the server as a last resort.

 

We have been unable to find out why the windows service stops calling the web service. My money would have been on the windows service loosing the connection to the web service, but I'm not too confident on that been the cause. We have gone through the code and have shown an independent developer the code but no luck there either.

 

Suggestions?

 

Mike55.

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

Posted

Event logging

 

When we check the server, both the windows and web service appear to be working correctly.

 

Clearly something isn't working correctly. Your first task is to identify what is exactly is failing. I would suggest adding code which writes to the Windows event log (or indeed any log file) at critical points in the code, such as when the timer fires, when the service is invoked, when the web service receives the invocation, and so forth. It goes without saying that any exceptions should also be logged.

 

Once you have identified where the problem lies, you can then set about identifying what causes it. It is somewhat inconvenient that the problem only occurs every few days, but without further investigation any proposed fix is likely to be purely speculation.

 

Good luck :)

Never trouble another for what you can do for yourself.
Posted

Re: Event logging

 

Yea, that's how I am proceeding at the moment. Once I have completed adding in the extra code, its just sit back and wait for the system to fail.

 

Mike55.

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...