NetTalk Central

Author Topic: NetTalk 14.30 and Host.exe  (Read 149 times)

jking

  • Sr. Member
  • ****
  • Posts: 437
    • View Profile
    • Email
NetTalk 14.30 and Host.exe
« on: November 30, 2026, 12:25:52 PM »
I have a Clarion 11.1.13855 app that uses NetTalk 14.30.  I have 8 Nettalk apps (DLLs) that I run using the Host.exe program.  On a new Windows Server 2025 Standard machine, the host.exe app has been hanging after running for a few days.  The server ISP says he checked the logs and believes it to be: 

"The issue with the web application appears to be port exhaustion.  The clients are closing the connections, but the application is not closing the ports."

Is there a solution to this?

Thanks!

jking

  • Sr. Member
  • ****
  • Posts: 437
    • View Profile
    • Email
Re: NetTalk 14.30 and Host.exe
« Reply #1 on: December 01, 2026, 08:27:56 AM »
Hi Bruce,

Here's what I've gathered since my first post, with the help of Claude, in case it helps narrow things down.

Setup

Clarion 11.1.13855, NetTalk 14.30 (plus StringTheory, JFiles, xFiles)
Multi-site host (PreludeHost14.exe) running 8 NetTalk DLL apps on ports 80 and 443
New server: Windows Server 2025 Standard. The same setup didn't hang on the previous server.
Symptom: the host stops responding after a few days and works again after a restart. The ISP thinks it's port exhaustion ("clients close the connections, but the application is not closing the ports").

Workaround in place
A PowerShell script restarts the host every night. It closes the host normally (WM_CLOSE) and only force-stops it if that doesn't work. Before stopping the host, it logs the state of the sockets on 80/443 and the process handle count.

What the logs show so far

Shortly after a fresh start: 1 TIME_WAIT, 2 LISTEN, 398 handles
After about 15 hours (before the next restart): 19 ESTABLISHED, 2 LISTEN, 0 CLOSE_WAIT, 546 handles
No CLOSE_WAIT sockets have appeared yet, so I haven't been able to confirm what the ISP described.
After 15 hours of running, the host took about 25 seconds to close normally; a few minutes after starting it closed in 1 second. Is that expected while it waits for open connections to close?
I'm now logging the remote IP and age of each open connection with a newer script, so I'll know whether those 19 are current users or stale connections.

Likely problem: the request log
The host writes every GET and POST to a TPS log, wsLog.tps. On this server the file had reached about 1.5 GB and 2,931,694 records. On a copy of the file, TopScan reports possible corruption when reading the most recent records, and rebuilding the keys doesn't fix it. The copy was made while the host was running, so it may not be a perfect snapshot, but either way the file is close to the TPS size limit. I'm replacing it with a fresh file today and will watch whether the hangs stop.

Questions

Could a very large or corrupt TPS log, written on every request, make the host hang or hold connections open? For example, a thread stuck in a write while holding a lock that other requests wait on.

Is wsLog part of NetTalk's host logging, or our own code? If it's NetTalk's, is there a setting to limit or rotate it?

Are there settings in 14.30 for idle or inactive connection timeouts on the host's WebServer that I should check, or is there a later build with relevant fixes for the host, keep-alive or SSL connections?

Anything else you'd like me to log or capture next time it hangs (for example a netstat output, or a process dump from Task Manager)?

Thanks,

Jeff King
« Last Edit: December 01, 2026, 08:36:41 AM by jking »

jking

  • Sr. Member
  • ****
  • Posts: 437
    • View Profile
    • Email
Re: NetTalk 14.30 and Host.exe
« Reply #2 on: Today at 01:00:53 PM »
Update: PreludeHost14 (multi-site host) hangs, GPFs in NetEnc.Clw, and a version mismatch found

Hi Bruce,

Following up on my earlier post. Since then I've collected more information and found some likely causes. I'd appreciate your view.

Setup

Clarion 11.1.13855, NetTalk 14.30, StringTheory, JFiles, xFiles
Multi-site host (PreludeHost14.exe) running 8 NetTalk DLL apps on ports 80 and 443
Windows Server 2025 Standard (the GPF report says "Win 2012", but ntdll is 10.0.17763)
The host hangs after a few days and works again after a restart. The ISP suspected port exhaustion. For now a script restarts it nightly and logs the socket state, handles and memory before each restart.

1. Two identical GPFs in NetEnc.Clw
GPFReport.log shows two crashes on this server, on 13 Mar 2026 and 17 Oct 2026, with the same signature:

EXCEPTION_ACCESS_VIOLATION - Error reading data
Thread : 2   Event : 523
Error at address : ...E9CEh  Module=VCRUNTIME140.dll 14.50.35719.0
Stack: Src=NetEnc.Clw  Line ?=246  Module=CLAnet.dll 14.20.0.0

Program memory at the time was 90?120 MB, with plenty of address space free.

2. CLAnet.dll version mismatch
The apps are built with NetTalk 14.30, but the host folder and all the app folders on the server had CLAnet.dll 14.20.0.0. The IDE apparently doesn't replace a copy that's already in the deployment folders, and locally a redirection file hid the problem. Tonight I'm replacing it with the 14.30 CLAnet.dll everywhere. The OpenSSL DLLs (libcrypto-3 and libssl-3) are already the correct version.

3. Our own request logging (not NetTalk's) was risky
The host had "Log All Pages" turned on. Our code writes every request to a TPS file (wsLog.tps) inside self._wait() / self._release(). While holding the lock it also calls ds_Memory() and GetFreeDiskSpace() and uses Access:wsLog.Insert(). The file had grown to about 1.5 GB and 2.9 million records and is badly corrupt: TPSFix itself crashes with an access violation on it. I've turned logging off, and tonight the file will be replaced. If I turn logging back on, I'll use TryInsert, do no disk work while holding the lock, and log only the request line.

4. Idle connections are never dropped
The nightly script lists every non-listening socket on 80/443 before restarting. After 24 hours there were 16 ESTABLISHED connections, open for between 19 minutes and 22 hours, 14 of them on port 80. None were in CLOSE_WAIT. The sources look like scanners and crawlers (for example six connections from three addresses in one /16 block, opened within about a minute, plus Azure ranges). The Performance tab showed Connections current 2 and max 17, Threads max 6, Too Busy 0. With these connections open, the host doesn't close normally within 60 seconds and has to be force-stopped.

Questions:

Could running 14.30-compiled apps with a 14.20 CLAnet.dll explain the crash in NetEnc.Clw line 246? Or is there a known issue there, for example with malformed or abandoned TLS handshakes?

Is there an idle or inactivity timeout in 14.30 for the host, so connections that never send a complete request (or never finish the SSL handshake) are dropped? What value would you recommend?

Is there a better place or method in the host to log requests without holding _wait() during disk I/O?

For an automated nightly restart, is it better to use the host's Graceful Close than to close the window normally?

I'll post an update once the new DLL and the fresh log file have been in place for a while.  I have attached a recent nightly restart log file.

Thanks,

Jeff King
« Last Edit: Today at 01:04:21 PM by jking »