NetTalk Central

Recent Posts

Pages: [1] 2 3 ... 10
1
Web Server - Ask For Help / Re: NetTalk 14.30 and Host.exe
« Last post by jking 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
2
Web Server - Ask For Help / Re: NetTalk 14.30 and Host.exe
« Last post by jking 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
3
Web Server - Ask For Help / NetTalk 14.30 and Host.exe
« Last post by jking 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!
4

Hi Bruce

Forgot to add,
I can create a function to do a manual replace, however if there was one or 2 methods I can use that does the Parse/replace that will be ideal, as it will use the existing rules.

thanks

Johan 
5
Hi Bruce

Thanks , confirms what is happening.

If source is RAW, HTML either typed in the box or loaded from a session var does not parse the HTML and replace tags.

It works quite well if source is FILE.
Thinking it can be quite handy if the RAW source was also parsed and loaded from a session variable.
Would avoid the multiple disk file reads if there are a few of these on a page.

regards

Johan

6
>> However if the HTML is pre-loaded in a session variable the dynamic data is not updated if the field is refreshed.

It's not going to parse the contents of session values. I think that's the root of your problem here. You're not injecting HTML, you're injecting a session value, which happens to contain HTML.
7
Web Server - Ask For Help / Re: nettalk 14.38 Webserver crashes sometimes
« Last post by AtoB on November 19, 2026, 08:25:59 AM »
Hi Bruce,

at that I looked at the download example app and the netwebpage proc, but there are some downsides to it. My netwebmethod is a little customized so automatically validates and identifies partys, generates help pages and now I also can simply let partys issue a

GET /wsResources/resources/somefile.jpg

And with netwebpage (as far as I know) I cannot achieve the same simple url usage without introducing an extra parameter for the actual filename (again: this might be my lack of knowledge). Without the parameter it always resolves to serving files from the public \web folder (so my procedure doesn't get called at all).

The mechanism I've created seems to work perfectly and I cannot find out why/how it crashes (in this case the procedure always returns an empty string, as this production environment doesn't even have this enpoint implemented and the procedure is hardcoded to return an empty string ...)

But now I know where it's roughly crashing and I can build in some tracer ... curious what requests actually kill this thing :-)

Thanks for pointing me in the right direction!

Regards
Ton

8
Hi Bruce

I have a form with a display field, this contains an HTML snippet, and the HTML also has some dynamic data from variables.
Currently I have the snippet in a file on disk and the display field source is a file tag.
The dynamic data is updated when the field is refreshed.

However if the HTML is pre-loaded in a session variable the dynamic data is not updated if the field is refreshed.

I have tried to follow the difference in code between the file tag and session variable, but not sure of the code that triggers the replacing of the tags eg. <!-- Net:s:cli:email -->

In the past I have used a procedure to generate HTML and then did the replacing by hand, so it's do-able.
As there are other tags available, like host besides session.

Would just be handy if the builtin methods can be used or triggered.

a simple example

<dl class="rows">
      <div class="row">
       <dt>
        Full name
       </dt>
       <dd data-value="fullName">
        <!-- Net:s:cli:first_name --><!-- Net:s:cli:name -->
       </dd>
      </div>
      <div class="row">
       <dt>
        Email
       </dt>
       <dd data-value="email">
        <!-- Net:s:cli:email -->
       </dd>
      </div>
      <div class="row">
       <dt>
        Mobile
       </dt>
       <dd data-value="mobile">
        <!-- Net:s:cli:cell_nr -->
       </dd>
      </div>
</dl>


thanks

Johan



 

9
Web Server - Ask For Help / Re: nettalk 14.38 Webserver crashes sometimes
« Last post by Bruce on November 18, 2026, 07:56:43 AM »
If you want the result to be "just a file" and not an API response (with the file embedded in XML or JSON) then don't use a WebServiceMethod.
Use a NetWebPage instead. See File Download example.
10
Web Server - Ask For Help / Re: nettalk 14.38 Webserver crashes sometimes
« Last post by AtoB on November 17, 2026, 11:12:20 PM »
Hi Bruce,

then I problably know what is causing this and this is due to my own actions (see attached screenshot with code I inserted, line number might be off ... as the gpf report is from an exe I shipped months ago)

I'm trying to send a resource (file) when wsResources/resources is hit. It then calls "resources" (to validate api-key and the lot) which is a netwebservicemethod procedure.

I guess sometimes this doesn't return the correct data ... and crashes the server.

What I'm actually trying to accomplish is "send" the file from within the netwebservicemethod procedure (I commented out the line that was intended for this purpose, but adding the sendfile there doesn't work (I think it starts a recursion).

If you can pinpoint me in the right direction with the latter, the code in NetwebWorker can be removed

This is the part that now returns the filename to serve (SELF.rData is a StringTheory object that is returned to the call, NetWebWorker in this case and now contains the actual filename to be served):


  IF lDownLoadOk
    IF ~EXISTS(lFnResourceFull)
      lDownloadOk = False
    END
  END
 
  IF lDownloadOk
    p_web.HeaderDetails.ContentDisposition = 'attachment; filename="' & CLIP(lFnResource) &'"' 
    p_web.ReplyContentType = p_web.GetContentType(lFnResource)
 
    SELF.rData.setvalue('fn:' & lFnResourceFull)
    ODS('value: ' & CLIP(SELF.rData.GetValue()))
    !SELF.rP_Web._SendFile(lFnResourceFull)
   
    SELF.SkipBuild  = True
    SELF.SkipSend   = True
    SELF.ReturnData = True
   
  ELSE
    SELF.rP_Web.SendError (400, 'Bad Request', 'The requested file was not valid') ! Bad Request
  END
Pages: [1] 2 3 ... 10