As for the timeout error, our hosting provider was experiencing latency issues
earlier today. The problem is resolved now. We apologize for the inconvenience.
As for the 503 error, We rate limit the API to ensure fair distribution of capacity among users. You can learn more about the limitations here:
If your application sends multiple API requests at a time or more than 30 requests per minute, 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. Unsuccessful/failed requests do not consume tokens. Here is a pseudocode example:
tries = 0
success = False
while not success:
tries += 1
call the API
success = True
catch (pdfcrowd.Error why):
if tries == 5:
some serious error, log or re-throw the exception
sleep(1 or 2 seconds)