HTTP Get Request 5xx response

Post Reply
jasonx
Member
Posts: 29
Joined: Wed Jul 03, 2019 3:03 pm

HTTP Get Request 5xx response

Post by jasonx »

Hey everyone,

I download PDF files from our CDN. Our provider had issues yesterday where there service wasn't operating correctly. I was receiving many 503 responses and this seemed to crash the HTTP request and not retry or timeout the job. To get around it I set a hold condition to allow one job at a time. What would happen is this job then would become stuck and not allow any othher jobs to process until I manually deleted the job. Is there a way of handling the 503 response more cleanly using another method of downloading PDF files over HTTP? I understand the server should be giving correct responses but we don't fully control this external service.

It also seems then the job uses one of the cocurrent job slots and doesn't free up until its removed.

Thanks
freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Re: HTTP Get Request 5xx response

Post by freddyp »

When the HTTP request element receives a 5xx HTTP error it does not crash, but it goes into fail mode. You can see that because there is a red wheel on the element. In the Switch Preferences in the Error handling section there is a setting "Retry failed external processes". That is a value in minutes and if not 0 Switch will retry the jobs that are waiting in the input folder every x minutes. So, once the web service is restored the flow will continue processing the jobs.
jasonx
Member
Posts: 29
Joined: Wed Jul 03, 2019 3:03 pm

Re: HTTP Get Request 5xx response

Post by jasonx »

Thanks Freddy,

It seemed like the job kept waiting to retry and took up one of the available job slots.

I ended up changing the flow so only one job at a time would process but because the 503 errors kept occuring throughout the day I had to manually remove some jobs.

Will the job stay active during the wait time for retry or should a slot be released for other jobs in the flow?
freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Re: HTTP Get Request 5xx response

Post by freddyp »

Jobs are not active, i.e. they do not take up a processing slot, when they are waiting in front of an element in a fail state. If you have proof of the contrary please report that to support.
Jiyahana
Newbie
Posts: 9
Joined: Wed Jan 03, 2024 6:06 pm
Location: India
Contact:

Re: HTTP Get Request 5xx response

Post by Jiyahana »

Try implementing a retry mechanism with exponential backoff. This helps in managing intermittent server issues and implementing a timeout mechanism to prevent jobs from becoming stuck indefinitely. Ensure proper error handling and job cleanup procedures to free up concurrent job slots.
Post Reply