Form becomes unresponsive after 2 hours.

  • Thread starter Thread starter DenoxiS
  • Start date Start date
D

DenoxiS

Hi,

I'm having problem with this internet application. It's a simple form
with a button and couple text boxes where I can enter parameters like
timeout etc.

Once I push the button, it starts reading the content of a specific
URL and updating the database every minute or so. When I leave the
application for overnight I find it "frozen". It seems it's still
doing its job, but I cannot restore the form on the screen. The only
way to stop is to "end task" from task manager.

I use httprequest and httpresponse objects. Problem doesn't appear in
debug mode, but in the exe file. I believe it takes 1-2 hour to be
unresponsive like that. I use doEvents in a Timer object every second.
Clinet machine has latest Framework installed. Different clients give
the same result. As for the database, I connect to a MS SQL database
somewhere on the Intranet.

Any suggestion on that?

Thanks in advance...
 
DenoxiS,
Have you considered creating a Windows Service instead of a Windows Forms
application?
I use doEvents in a Timer object every second.
Is this a Windows.Forms.Timer? You may need to call DoEvents, to have the
Timer click event handled, in other words if the Timer's click event is not
handled, then your DoEvents is not called, which means that the Timer.Click
event cannot be handled.

I would look at creating a Windows Service instead, and use the EventLog
(ServiceBase.EventLog) property to write information (start, stop, file) to
the Windows Event Log, I would also add
System.Diagnostics.PerformanceCounter classes to keep track of work being
done.

I would then either use the built-in Windows utilities to check the event
log & performance counters or write a simply Windows Forms app that collects
& displays the info. This windows forms app would not need to be left
running...

Hope this helps
Jay
 
Hi DenoxiS,

Are you sure you are not creating endless objects in a single method?

Just a thought

Cor
 
Back
Top