HL7802 - KHTTP_ERROR: 1,6 (TimeOut)

Hello Community,
I m working with a HL7802 and my server. During important server charges, several of my modems do not answer and got a timeout. I speak about 1-2 min in late, due to the load.

I know my JSON is correctly sent but the server answer is not read. I setting in my “AT-CMD ATC_KHTTPPOST” a timeout of 100sec.
My issue is the HL7802 gives me this error after only about 30sec :

NO CARRIER

+KHTTP_ERROR: 1,6

Is there a 30 sec timeout by default ?
How can i increase this one ?

Regards,
ER1.

have you configured +KCNXTIMER ? (e.g. “idletime” parameter)

Have you captured wireshark log in server side and see if the disconnect is initiated by server?

do you see same problem with other HTTP server?

Here is my testing:



[2024-01-26 12:02:18.178] at+kcnxtimer?
[2024-01-26 12:02:21.007] 
[2024-01-26 12:02:21.007] +KCNXTIMER: 1,30,2,60,30
[2024-01-26 12:02:21.007] 
[2024-01-26 12:02:21.007] OK
[2024-01-26 12:03:56.335] at+kcnxtimer=,1,30,2,60,1800
[2024-01-26 12:04:07.711] 
[2024-01-26 12:04:07.711] OK
[2024-01-26 12:04:28.888] AT+KHTTPCFG=1,"123.123.123.123",80,0
[2024-01-26 12:04:29.823] 
[2024-01-26 12:04:29.823] +KHTTPCFG: 1
[2024-01-26 12:04:31.963] 
[2024-01-26 12:04:31.963] OK
[2024-01-26 12:04:31.963] 
[2024-01-26 12:04:31.963] +KCNX_IND: 1,4,1
[2024-01-26 12:04:31.963] 
[2024-01-26 12:04:31.963] +KCNX_IND: 1,1,0
[2024-01-26 12:04:34.260] 
[2024-01-26 12:04:34.260] +KHTTP_IND: 1,1
[2024-01-26 12:04:34.609] AT+KHTTPHEADER=1
[2024-01-26 12:04:36.069] 
[2024-01-26 12:04:36.069] CONNECT
[2024-01-26 12:04:44.178] 
[2024-01-26 12:04:44.178] OK
[2024-01-26 12:04:48.102] AT+KHTTPPOST=1,,"/post_put.php"
[2024-01-26 12:04:53.431] 
[2024-01-26 12:04:53.431] CONNECT
[2024-01-26 12:04:55.667] HTTP/1.1 201 Created
[2024-01-26 12:04:55.667] date: Fri, 26 Jan 2024 04:05:04 GMT
[2024-01-26 12:04:55.698] server: Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.3.10
[2024-01-26 12:04:55.698] x-powered-by: PHP/7.3.10
[2024-01-26 12:04:55.698] content-length: 0
[2024-01-26 12:04:55.698] content-type: text/html; charset=UTF-8
[2024-01-26 12:04:55.698] 
[2024-01-26 12:04:55.698] --EOF--Pattern--
[2024-01-26 12:04:55.698] OK
[2024-01-26 12:04:55.698] 
[2024-01-26 12:04:55.698] +KHTTP_IND: 1,3,5,201,"Created"
[2024-01-26 12:05:01.268] 
[2024-01-26 12:05:01.268] +KCNX_IND: 1,5,1800
[2024-01-26 12:05:01.268] 
[2024-01-26 12:05:01.268] +KHTTP_IND: 1,0
[2024-01-26 12:11:23.998] ati3
[2024-01-26 12:11:24.473] 
[2024-01-26 12:11:24.473] HL7802.4.6.9.4
[2024-01-26 12:11:24.473] 
[2024-01-26 12:11:24.473] OK

Hello jyijyi !
Thanks for your very quick answer !

To be clear, my web server sends the “201” response after the HL module sends the JSON. The gap between the two actions is 2min.

I reproduce your idea to set up the timeout to 1000 seconds. I join the result :

+KCNXTIMER: 1,30,2,60,1000

OK
HL_postStr

— Header —
CONNECT
Host: TEST.fr
Accept: /
Content-Length: 7075
Content-Type: application/json
User-Agent: TESTER1
— Post —

CONNECT

--------------Retour serveur:
--
------------ 1 secondes

[!]MaxWatchdogTimer: 1 / 14 [!]

--------------* 2 secondes
--------------* 3 secondes
--------------* 4 secondes
--------------* 5 secondes
--------------* 6 secondes
--------------* 7 secondes
--------------* 8 secondes
--------------* 9 secondes
--------------* 10 secondes
--------------* 11 secondes
--------------* 12 secondes
--------------* 13 secondes
--------------* 14 secondes
--------------* 15 secondes
--------------* 16 secondes
--------------* 17 secondes
--------------* 18 secondes
--------------* 19 secondes
--------------* 20 secondes
--------------* 21 secondes
--------------* 22 secondes
--------------* 23 secondes
--------------* 24 secondes
--------------* 25 secondes
--------------* 26 secondes
--------------* 27 secondes
--------------* 28 secondes
--------------* 29 secondes
--------------* 30 secondes

NO CARRIER

+KHTTP_ERROR: 1,6
--------------* 31 secondes

NO CARRIER

+KHTTP_ERROR: 1,6
--------------* 32 secondes

Thank you in advance,
ER1.

any idea why i cannot reproduce the issue?

Have you captured wireshark log in server side and see if the disconnect is initiated by server?

do you see same problem with other HTTP server?

any idea why i cannot reproduce the issue?

Because in your example, the server say “201” into 7secondes. In my case if my server needs to manage 7000 JSON in the same time, the 201 will arrive after 120 secondes.

Have you captured wireshark log in server side and see if the disconnect is initiated by server?

I will try it next week, but for me the connection is not close by the server.

do you see same problem with other HTTP server?

No and with the same server it is working very well if the load is low.

seems I can reproduce the issue:


[2024-01-27 11:58:43.797] ati3
[2024-01-27 11:58:44.212] 
[2024-01-27 11:58:44.212] HL7802.4.6.9.4
[2024-01-27 11:58:44.212] 
[2024-01-27 11:58:44.212] OK
[2024-01-27 12:04:41.560] AT+KHTTPCFG=1,"123.123.123.123",80,0
[2024-01-27 12:04:42.796] 
[2024-01-27 12:04:42.796] +KHTTPCFG: 1
[2024-01-27 12:04:42.826] 
[2024-01-27 12:04:42.826] OK
[2024-01-27 12:04:42.826] 
[2024-01-27 12:04:42.826] +KCNX_IND: 1,6
[2024-01-27 12:04:42.826] 
[2024-01-27 12:04:42.826] +KCNX_IND: 1,1,0
[2024-01-27 12:04:44.505] 
[2024-01-27 12:04:44.505] +KHTTP_IND: 1,1
[2024-01-27 12:04:52.978] AT+KHTTPHEADER=1
[2024-01-27 12:04:54.079] 
[2024-01-27 12:04:54.079] CONNECT
[2024-01-27 12:05:01.967] 
[2024-01-27 12:05:01.967] OK
[2024-01-27 12:05:05.783] AT+KHTTPPOST=1,,"/post_put_delay_60s.php"
[2024-01-27 12:05:06.952] 
[2024-01-27 12:05:06.952] CONNECT
[2024-01-27 12:05:39.166] 
[2024-01-27 12:05:39.181] 
[2024-01-27 12:05:39.181] NO CARRIER
[2024-01-27 12:05:39.181] 
[2024-01-27 12:05:39.181] +KCNX_IND: 1,5,30
[2024-01-27 12:05:39.181] 
[2024-01-27 12:05:39.181] +KHTTP_ERROR: 1,6
[2024-01-27 12:06:10.239] 
[2024-01-27 12:06:10.239] +KCNX_IND: 1,3

For a normal server, it should not reply so slow…
Probably the workaround for using your server is to use TCP raw data transfer.

Ok I understand. Thank you for trying (with success) to reproduce the issue.

In my side the old solution was to send again the same JSON. But in this case we the load increasing again more the server load …

Any trick to get around the problem ?

ER1.

Have you tried +kTCPSTART for http data transfer?

Finaly the issue has been solved by a server action.
The answer is now sent with a latency of 1 seconde.

Thank you,
ER1.