Hello Jean-Marc
My educated guess would be that the values in the request header should be modified to reflect the behaviour you want the HTTP Post to have.
<header name="connectionTimeout" +
value="120000" /> +
<header name="readTimeout" +
value="120000" /> +
The values for the timeouts ("120000") stand for 120,000 seconds which is over 33 hours. If you decrease these values, the SQL query will stop with an error response at an earlier moment
Kind regards,
Martijn van Breden
lead software architect
________________________________
Van: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> namens Jean-Marc DUVAL via RPG400-L <rpg400-l@xxxxxxxxxxxxxxxxxx>
Verzonden: dinsdag 10 oktober 2023 09:14
Aan: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
CC: Jean-Marc DUVAL <jean-marc.duval@xxxxxxxxxxx>
Onderwerp: RE: Time limitation for Systools.Httppostclobverbose
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Is there any one to help me ?
-----Message d'origine-----
De : RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> De la part de Jean-Marc DUVAL via RPG400-L
Envoyé : jeudi 5 octobre 2023 09:13
À : rpg400-l@xxxxxxxxxxxxxxxxxx
Cc : Jean-Marc DUVAL <jean-marc.duval@xxxxxxxxxxx>
Objet : Time limitation for Systools.Httppostclobverbose
Hi,
I have the following embedded SQL query :
EXEC SQL
SELECT VARCHAR(Responsemsg, 2048),
VARCHAR(Responsehttpheader, 512)
INTO:Responsemsg INDICATOR:Nullresponsemsg,
:Responsehttpheader INDICATOR :Nullresponsehttpheader
FROM TABLE( Systools.Httppostclobverbose(TRIM(:Url) ,
CAST (:Httpheader AS CLOB(1k)),
CAST(:Requestmsg AS CLOB(10k))));
With
httpHeader = '<httpHeader> +
<header name="connectionTimeout" +
value="120000" /> +
<header name="readTimeout" +
value="120000" /> +
<header name="Content-Type" +
value="*/*" /> +
<header name="Ocp-Apim-Subscription-Key" +
value="' + %trim(ApiKey) + '" /> +
<header name="X-Correlation-ID" +
value="' + %trim(CorrelationID) + '" /> +
</httpHeader>';
It has been running without problem for months but during one run, it "froze" until the processing was stopped 8 hours later.
The logs show that a response was sent but never received by the request.
Question: Is there a way to limit/control the execution time of a query?
Cordialement,
Jean-Marc DUVAL
Pôle développement IT
Développeur IBM i consultant
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://urldefense.com/v3/__https://lists.midrange.com/mailman/listinfo/rpg400-l__;!!J76aczzK!yenxo26HBjUp-KoDtmN7AcUkEaCvNJXuaAKV8TyNctx0n_yRKyqJAlb6_SNg_vKJWX-o3ERrqarlPa5OKfhnGRLgh_kOgQ$
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.com/v3/__https://archive.midrange.com/rpg400-l__;!!J76aczzK!yenxo26HBjUp-KoDtmN7AcUkEaCvNJXuaAKV8TyNctx0n_yRKyqJAlb6_SNg_vKJWX-o3ERrqarlPa5OKfhnGRLO9B5N_A$ .
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.