A curl command in a Bash script (called by cron) asks a web service/API, on another device/server (hosts both the API and the SQL database), to perform an operation on a database. How long this operation takes, depends on the amount of rows on which the operation is performed.
It is important that the API communicates the result back to me, so it is programmed to do so.
I notice that when the operation is performed on a larger subset of rows (say hundreds of thousands, rather than tens of thousands), that takes – ballpark figure – more than a couple of minutes for the operation to complete, I get no feedback but only an error:
“502 – Web server received and invalid response while acting as a gateway or proxy server”
“When the Web server contacted the upstream content server, it received an invalid response from the content server.”
I looked up the options curl gives me and keep-alive is the default setting. I nonetheless specified it, but no luck:
curl -s --keep-alive-time 5 –X GET “https://api.url.com/api/call” –H “accept: application/octet-stream” –H “Authorization: Bearer $password”
Since that is the only command I invoke and, apart from keep-alive, --connect-timeout and –m as per this thread don’t seem to be applicable, I’m fast running out of ideas.
Could anyone point me in the right direction?
EDIT: Checking the logs, as suggested, indicates I need to increase the ARR time-out ([Windows article][2]). Other threads explain the simple steps.
However, I do not see Application Request Routing (ARR) in IIS 1607 (Windows Server 2016).