NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Graham on January 19, 2020, 05:36:09 AM

Title: WebServer connections growing
Post by: Graham on January 19, 2020, 05:36:09 AM
Hi All

Anyone else experiencing growing connections to a WebServer?  Recently converted a WebServer from C6/NT7 to C11/NT11.28

As highlighted in attached snap, I see a steady increase in current connections in the NT11 app

App has 2 fairly standard NetWebPage's which does some file access (TPS) and returns a JSON response.

Have added p_web.ReplyComplete calls at the end of each procedure - made no difference to increasing connection count

Have disabled "Keep-Alive" Server setting in template

After a few days, App chokes and won't accept any further connections - have to restart

Appreciate any ideas

Thanks Graham


Title: Re: WebServer connections growing
Post by: Graham on January 19, 2020, 08:58:35 PM
In addition to this...

I have a bog standard NT Multi Site Host running, 1 site with a single static HTML page

Current connections also seem to be climbing over time...
Title: Re: WebServer connections growing
Post by: peterH on January 20, 2020, 04:33:05 AM
Hi Graham,

I'm not seeing this on any of my servers (be it stand alone or multi host).
Quite a few of the settings on the server window have changed from NT7 to NT11 so worth checking. Also, I'm wondering if you're somehow preventing the sessions from timing out?

Peter
Title: Re: WebServer connections growing
Post by: DonRidley on January 20, 2020, 04:34:52 AM
Just watched my Multi-Site Host as my folks started their shift this morning. (They login, perform vehicle inspections, etc., then logout.) 

Connections seemed fine here.  Count rose and fell as expected.

Don
Title: Re: WebServer connections growing
Post by: Bruce on January 20, 2020, 09:37:33 PM
Hi Graham,

What you are seeing is not the norm, so to determine the cause it's helpful to understand what you are doing that is "not normal".

You indicate that this is an API type app (using NetWebPages) - which suggests that your client software is a program rather than a browser. It's possible your client program is not closing connections correctly?

One change I can see is that over the years the server timeout was turned off, so the server won't time-out idle client connections. You could set that back if you like (say to 2 minutes or whatever works for you.) I'm talking about connection timeouts here, not session timeouts (that's a completely different discussion, and does not appear to be in play.)

My gut is that your clients are not correctly closing the connections once they are done with the request. So either they should be fixed (to respect the HTTP protocol) or some proxy is between you and the clients and is not closing connections.

So either fix the clients, or set the server connection timeout.

cheers
Bruce
Title: Re: WebServer connections growing
Post by: Graham on January 22, 2020, 09:09:22 PM
Hi Bruce,

Thanks for your thoughts and yeah, this is a sort of API Server which was cobbled together some 12 odd years ago.

Since running into this issues, I have refactored the WebClient side to be more "respectful" but to roll this out to all sites will take time.

I am investigating some other strange behaviour on this Win2008 box - if I find anything relevant/related, will let you know

Regards
Graham
Title: Re: WebServer connections growing - Update
Post by: Graham on January 27, 2020, 09:03:09 PM
My original post was with the app running on an old Win 2008 box which I suspect has some issues...

Moved app to newer Win 2016 Server and seems a lot happier - see pic

Don't have time to figure out what the difference is, just happy that it's running as expected...