Atozed Forums
Crashes when http port is polled regularly by a monitoring program. - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: Crashes when http port is polled regularly by a monitoring program. (/thread-2393.html)



Crashes when http port is polled regularly by a monitoring program. - Bobokonijn - 05-06-2021

Hello Intraweb team,

I have an application (NT Service) that has an Intraweb-based http management console listening on port 8888. This console is only very rarely accessed, it is for administration purposes.


A colleague of mine has written a monitoring tool that checks every 5 minutes if my service is still "alive" by simply connecting to tcp port 8888 and disconnecting immediately. No data is sent. The problem: Ever since he activated this monitoring tool, my service crashes every few days. 

In the Windows application event log I find the error address and it appears that this address is in one of the Intraweb units, probably in the destructor tIWServerInternalfiles.Destroy (see screenshot in the attachment).


The Intraweb version is 15.2.27 and the Delphi version is 10.4.2.


RE: Crashes when http port is polled regularly by a monitoring program. - Jose Nilton Pace - 05-06-2021

Hi, another way to test it is "alive" is:
http://youriwsite.com/$/ping


RE: Crashes when http port is polled regularly by a monitoring program. - DanBarclay - 05-06-2021

(05-06-2021, 09:55 AM)Bobokonijn Wrote: Hello Intraweb team,

I have an application (NT Service) that has an Intraweb-based http management console listening on port 8888. This console is only very rarely accessed, it is for administration purposes.


A colleague of mine has written a monitoring tool that checks every 5 minutes if my service is still "alive" by simply connecting to tcp port 8888 and disconnecting immediately. No data is sent. The problem: Ever since he activated this monitoring tool, my service crashes every few days. 

In the Windows application event log I find the error address and it appears that this address is in one of the Intraweb units, probably in the destructor tIWServerInternalfiles.Destroy (see screenshot in the attachment).


The Intraweb version is 15.2.27 and the Delphi version is 10.4.2.

Can you define "connect"?  Is he doing a TCP connection, an HTTP transaction, other?  It sounds like he's doing a TCP connection only.

I have a remote management console that updates regularly (more often than 5 minutes), making an HTTP call to a CustomHandler.  It runs for long periods without problem.

If he's only making a TCP connection then check on how the TCP is terminated (I'm not an expert on that, I've only fumbled around with it).   Or, better, see if he can do an actual transaction with your app.

Dan


RE: Crashes when http port is polled regularly by a monitoring program. - Bobokonijn - 05-07-2021

(05-06-2021, 07:18 PM)DanBarclay Wrote:
(05-06-2021, 09:55 AM)Bobokonijn Wrote: Hello Intraweb team,

I have an application (NT Service) that has an Intraweb-based http management console listening on port 8888. This console is only very rarely accessed, it is for administration purposes.


A colleague of mine has written a monitoring tool that checks every 5 minutes if my service is still "alive" by simply connecting to tcp port 8888 and disconnecting immediately. No data is sent. The problem: Ever since he activated this monitoring tool, my service crashes every few days. 

In the Windows application event log I find the error address and it appears that this address is in one of the Intraweb units, probably in the destructor tIWServerInternalfiles.Destroy (see screenshot in the attachment).


The Intraweb version is 15.2.27 and the Delphi version is 10.4.2.

Can you define "connect"?  Is he doing a TCP connection, an HTTP transaction, other?  It sounds like he's doing a TCP connection only.

I have a remote management console that updates regularly (more often than 5 minutes), making an HTTP call to a CustomHandler.  It runs for long periods without problem.

If he's only making a TCP connection then check on how the TCP is terminated (I'm not an expert on that, I've only fumbled around with it).   Or, better, see if he can do an actual transaction with your app.

Dan



RE: Crashes when http port is polled regularly by a monitoring program. - DanBarclay - 05-07-2021

It looks like your message didn't come through.

But, more comment, the test Jose suggested is a "built in" handler similar to what I suggested. What he suggested is already there, just call it.

One difference is that if you write one specifically for your monitor then you can return status of your app (session counts, loading, etc) if you want, though you may want to put some kind of security on the message content. See the CustomHandler demo.

Dan


RE: Crashes when http port is polled regularly by a monitoring program. - Alexandre Machado - 05-11-2021

I created a regular Indy client application (sorry, I still prefer Delphi over Python, 1000x :-) ) with a timer programmed to run each 1 second, to connect to the same port as my IW server is. It connects, disconnects, rinse, repeat. I let it run for 12 hours straight, meaning that it pooled my application approximately 40 thousand times.
The application kept running stable. BTW, no session was created and zero bytes were transferred as a result of these connections.

Having said that, are you 100% sure that nothing is being sent to the server between the connection/disconnection?