473,387 Members | 1,572 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,387 software developers and data experts.

System.Timers.timer stops firing after extended time (windows service)

Hi all,

WE have a windows service using .net and which uses a
System.Timers.Timer..all the of code works fine..... but after a
extended period of time the timer just stops firing the elasped event.

the elasped event is fired every 2 sec and the code which is in the
elasped event is multithreaded.

This only happens if the service runs for a extended peroid of time..

Does anyone else have the same problem?

There is nowhere in the code that the timer is set to disabled or the
time should be stopped by some reason.

After googling it for a while i really didnt get the right answer..
..people suggest to switch to system.threading.timer but i just want to
make sure that there is a problem withe the System.Timers.Timer and
confirm it with the experts

here is a link to someone who has the same problem

http://discuss.develop.com/archives/...R1007&D=0&I=-3
http://weblogs.asp.net/sibrahim/arch.../13/58429.aspx

Can any one plz help

Cheers
Chintan

Aug 27 '06 #1
2 4017
Hello,

have you checked the possibility of resource exchaustion (maybe a
memory leak, ThreadPool filleds or something?)

Regards,
Tasos

ja****@gmail.com wrote:
Hi all,

WE have a windows service using .net and which uses a
System.Timers.Timer..all the of code works fine..... but after a
extended period of time the timer just stops firing the elasped event.

the elasped event is fired every 2 sec and the code which is in the
elasped event is multithreaded.

This only happens if the service runs for a extended peroid of time..

Does anyone else have the same problem?

There is nowhere in the code that the timer is set to disabled or the
time should be stopped by some reason.

After googling it for a while i really didnt get the right answer..
.people suggest to switch to system.threading.timer but i just want to
make sure that there is a problem withe the System.Timers.Timer and
confirm it with the experts

here is a link to someone who has the same problem

http://discuss.develop.com/archives/...R1007&D=0&I=-3
http://weblogs.asp.net/sibrahim/arch.../13/58429.aspx

Can any one plz help

Cheers
Chintan
Aug 27 '06 #2
no.. the exe didnt consume much of any resources and all the threads
and the memory was not blown up. There was no log in the eventlog as
well saying that the exe (windows service) has terminated. i also do
have a global error handling which would have trapped the error.


Tasos Vogiatzoglou wrote:
Hello,

have you checked the possibility of resource exchaustion (maybe a
memory leak, ThreadPool filleds or something?)

Regards,
Tasos

ja****@gmail.com wrote:
Hi all,

WE have a windows service using .net and which uses a
System.Timers.Timer..all the of code works fine..... but after a
extended period of time the timer just stops firing the elasped event.

the elasped event is fired every 2 sec and the code which is in the
elasped event is multithreaded.

This only happens if the service runs for a extended peroid of time..

Does anyone else have the same problem?

There is nowhere in the code that the timer is set to disabled or the
time should be stopped by some reason.

After googling it for a while i really didnt get the right answer..
.people suggest to switch to system.threading.timer but i just want to
make sure that there is a problem withe the System.Timers.Timer and
confirm it with the experts

here is a link to someone who has the same problem

http://discuss.develop.com/archives/...R1007&D=0&I=-3
http://weblogs.asp.net/sibrahim/arch.../13/58429.aspx

Can any one plz help

Cheers
Chintan
Aug 27 '06 #3

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

Similar topics

3
by: ELO | last post by:
Hi all Every week, I need to get two files on a remote server. I have developped a C# Windows Service with two System.Threading.Timer to do this task For the first one, the delay (TimeSpan...
5
by: caulker | last post by:
I have a simple Windows Service with a timer (system.timer). The service seems to run just fine when I have the Timer = 1 minute, but when I set the Timer = 15 minutes it only fires once ... then...
2
by: linesh.gajera | last post by:
Hi Guys, I am creating a Windows service that call a routine at given interval. Once routine is complete, windows service should wait for 5 minutes and then call the routine again. I was using...
2
by: cntams | last post by:
All, I have a Windows Service and it has one System.Timers.Timer that fires every 500 milliseconds. Now I have noticed that there's a bug in System.Timers.Timer when it's being used combined with...
1
by: | last post by:
Frustrated.. (I have seen other posts regarding this problem with no resolution..) I am using dotnet 1.1 with latest SP on a Win2KP box (actually 2 boxes), have even run the service on WinXP SP2...
4
by: Liverpool fan | last post by:
I have a windows application written using VB .NET that encompasses a countdown timer modal dialog. The timer is a System.Timers.Timer with an interval of 1 second. AutoReset is not set so accepts...
7
by: RobKinney1 | last post by:
Hello, Wow...I have one for you all and hopefully I am not understanding this timer object correctly. I have a timer setup that pulses a connection through a socket every 60 seconds. But it...
5
by: Tony Gravagno | last post by:
I have a class that instantiates two Timer objects that fire at different intervals. My class can be instantiated within a Windows Form or from a Windows Service. Actions performed by one of the...
8
by: Ollie Riches | last post by:
I'm looking into a production issue related to a windows service and System.Timers.Timer. The background is the windows service uses a System.Timers.Timer to periodically poll a directory location...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.