1
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
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
2
Web Server - Ask For Help / Re: Method to substitute <!-- Net:s:SessionVariable --> in HTML?
« Last post by JohanR on November 19, 2026, 03:04:24 AM »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
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>
</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
3
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.
Use a NetWebPage instead. See File Download example.
4
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
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
5
Web Server - Ask For Help / Re: nettalk 14.38 Webserver crashes sometimes
« Last post by Bruce on November 17, 2026, 03:24:23 PM »the problem seems to be in applaunch004.clw. I'm guessing that's your WebHandler?
you would likely need to post that to get more information.
you would likely need to post that to get more information.
6
Web Server - Ask For Help / Re: Method to substitute <!-- Net:s:SessionVariable --> in HTML?
« Last post by Bruce on November 17, 2026, 03:21:06 PM »typically it's done for you. But it depends on the context. So tell us more about what HTML you are using here?
7
Web Server - Ask For Help / Re: nettalk 14.38 Webserver crashes sometimes
« Last post by osquiabro on November 13, 2026, 03:27:33 AM »Verify that all templates required by NT are updated to the latest version.
8
Web Server - Ask For Help / Re: nettalk 14.38 Webserver crashes sometimes
« Last post by AtoB on November 12, 2026, 11:57:55 PM »I'm not using secwin or IMDD, and it's c10 (12412).
As I do have a gpf-report I assume it's compiled in debug mode, but are there ways to extract more info out of it?
Thanks
As I do have a gpf-report I assume it's compiled in debug mode, but are there ways to extract more info out of it?
Thanks
9
Web Server - Ask For Help / Re: nettalk 14.38 Webserver crashes sometimes
« Last post by seanh on November 12, 2026, 03:23:49 PM »Have you compiled in debug made and used the debug version of the RTL?
That will usually give you more information.
Also what version of clarion? and are you using secwin or the IMDD?
That will usually give you more information.
Also what version of clarion? and are you using secwin or the IMDD?
10
Web Server - Ask For Help / Re: Server becoming temporarily non-responsive
« Last post by TimR on November 10, 2026, 10:43:29 AM »No I haven't figured out what is going on, it doesn't happen frequently enough, for me to prioritize. I did, sort of, recreate this problem by flooding the server with requests using Apache Bench. There appeared to be some sort of staircase pattern going on with slowdowns, that got worse over time. It the server was given a chance to catch up, the slowdown went away.
I wasn't convinced my testing was actually chasing the problem, because I don't think my servers were getting flooded with requests. Also the server responded to all my testing requests, it just got slower and slower.
I wasn't convinced my testing was actually chasing the problem, because I don't think my servers were getting flooded with requests. Also the server responded to all my testing requests, it just got slower and slower.
Recent Posts