Hello Chris,
If your application sends multiple API requests at a time, the service returns the 503 error. If the API returns the 503 error, it is perfectly ok to sleep() for a few seconds and then resend the unsuccessful request. Here is an outline:
tries = 0
success = False
while not success:
tries += 1
try:
call the API
success = True
catch (pdfcrowd.Error why):
if tries == 5:
some serious error, log or re-throw the exception
else:
sleep(1 or 2 seconds)