News:

  • October 19, 2026, 06:15:47 PM

Login with username, password and session length

Author Topic: HTTPCMD Timeout  (Read 445 times)

JeffS

  • Hero Member
  • *****
  • Posts: 116
HTTPCMD Timeout
« on: October 13, 2026, 03:58:26 PM »
What are the chances this timeout could be editable?

I have some busier PLCs that seem to struggle doing some of the TLS stuff within the 30 second timeframe.  Typical scan times aren't crazy but average 11-12ms which based on wireshark data has the TLS response computation right at 30 seconds.  If I manually suspend programs to lower my scantime then the HTTPS completes within the 30 second timeout.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6177
  • Yes Pinky, Do-more will control the world!
Re: HTTPCMD Timeout
« Reply #1 on: October 14, 2026, 08:55:54 PM »
What are the chances this timeout could be editable?

I have some busier PLCs that seem to struggle doing some of the TLS stuff within the 30 second timeframe.  Typical scan times aren't crazy but average 11-12ms which based on wireshark data has the TLS response computation right at 30 seconds.  If I manually suspend programs to lower my scantime then the HTTPS completes within the 30 second timeout.

I'm sure it could be, it's hard coded now. At the least we could make it accessible via DEVREAD/DEVWRITE.

A big concern is how tolerant the server is when the TLS handshake goes long. Many servers drop the connection at 15 seconds.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

JeffS

  • Hero Member
  • *****
  • Posts: 116
Re: HTTPCMD Timeout
« Reply #2 on: October 15, 2026, 04:25:10 PM »
In this particular case the server is ours, so we can allow for a greater timeout.  I dug through my code to see if I could possibly suspend some programs but nearly all make sure of rising/falling edge contacts that would be missed while the program is suspended.  So at least for our situation I would really love a way to just extend the timeout so the PLC has more time to compute the response. 
« Last Edit: October 15, 2026, 04:34:47 PM by JeffS »

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3851
    • Host Engineering
Re: HTTPCMD Timeout
« Reply #3 on: October 18, 2026, 08:30:08 PM »
Would bumping the $TLSTimeSlice DST68 fix this?

From Help Topic DMD0208 System Assigned Nicknames
DST68 The amount of time (in microseconds) the TLS engine is allowed to run on each scan for each device trying to establish an encrypted connection to a server. TLS is used by SMTP (Email), and MQTT client devices, and the HTTPCMD instruction.

It will bump your PLC scan, but that will give the CPU more time on each scan to do some of the TLS logic.

JeffS

  • Hero Member
  • *****
  • Posts: 116
Re: HTTPCMD Timeout
« Reply #4 on: October 18, 2026, 08:53:52 PM »
Ok, yes that is something I wasn’t aware of.  And in this situation it will work fine I suspect since I don’t do a ton of https.

I’ll give it a try tomorrow.