473,513 Members | 2,709 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Timers quit working in a service..

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 box.. I have created a
service to grab data off a receive socket (small packets), place in a queue
(Queue class), and do an insert into SQL. I have 3 timers in my project. One
checks the status of the sql service every 15 seconds, one checks the time
every 2 seconds, and one checks the Queue every 150ms for data, if any write
the data to SQL. The queue timer subroutine and the sql timer have just
QUIT.. I placed break points at the start of the code and they no longer
fire, but the check time timer and other subs are still firing.. I am using
the correct timer type (not the forms timer). I disabled two of the timers
and it never breaks. The code breaks with all the timers running after
several hours, but I show no increase in memory(leak). I transferred the
code to a windows form app with all timers and it NEVER dies, What gives? I
have seen other posts saying more than one timer in a service causes
problems or that they encounter weird thing happen. Any ideas why
breakpoints are dead, multiple timers don't work.. ANy way to figure out
whats going on. Thanks...
BUC
Jan 9 '06 #1
1 1808
I found a workaround but am unsure why it works. There is no source code
anywhere to set .enable to false, and the debugging session says the timers
..enable property = true. SO..I set the .enable to false and then right back
to true and the each timers event's magically started firing again.. Weird
way to make it start working again. Something is buggy as crap with
system.timer in a service. I can easily dup this problem..
BUC
<Buc> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...
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 box.. I have
created a service to grab data off a receive socket (small packets), place
in a queue (Queue class), and do an insert into SQL. I have 3 timers in my
project. One checks the status of the sql service every 15 seconds, one
checks the time every 2 seconds, and one checks the Queue every 150ms for
data, if any write the data to SQL. The queue timer subroutine and the sql
timer have just QUIT.. I placed break points at the start of the code and
they no longer fire, but the check time timer and other subs are still
firing.. I am using the correct timer type (not the forms timer). I
disabled two of the timers and it never breaks. The code breaks with all
the timers running after several hours, but I show no increase in
memory(leak). I transferred the code to a windows form app with all timers
and it NEVER dies, What gives? I have seen other posts saying more than
one timer in a service causes problems or that they encounter weird thing
happen. Any ideas why breakpoints are dead, multiple timers don't work..
ANy way to figure out whats going on. Thanks...
BUC

Jan 9 '06 #2

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

Similar topics

1
371
by: GDumencu | last post by:
I have a C# program that have to run all the time. For some reasons I cannot make it a service. This program has 3 timers and by time to time ( days or weeks) one of them stops. Some times, starts...
3
2181
by: Nathan Kovac | last post by:
I have a feeling I am missing something simple, but I just can't find it. Perhaps someone can give me a lead on where to look. I will describe the issue then post my code to the web service. My...
6
5276
by: Max | last post by:
I have the following code on a form that launches Microsoft Outlook and creates a new email message for the user: Outlook.Application oApp = new Outlook.Application(); Outlook.MailItem oMail...
1
1113
by: jeff | last post by:
Greetings; Newbie here, please forgive my ignorance of the vb.net threading model. I am developing a windows service which is driven by a variable number of timers. All timers use the same...
2
1312
by: jeff | last post by:
Greetings; Newbie here, please forgive my ignorance of the vb.net threading model. I am developing a windows service which is driven by a variable number of timers. All timers invoke the same...
1
1886
by: Bamse | last post by:
Hi, can timers be used in webservices? as an example: to check at some time interval an object - Application and for each logged user, check its login period, and if it is greater than 30...
5
12171
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
3352
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...
4
1264
by: Blue Streak | last post by:
Hi, Folks! I have a question about concurrent timers. In my current project I am writing an NT Service (I know that is old terminology but I work with idiots who think you mean Web Service when...
0
7153
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
7373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7432
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...
1
7094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7519
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5079
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.