I've got a public URL that completes download in under 2 seconds that sporadically gives me 502's when calling via curl with the following page setup. I read in other places in the forum that this could happen if my request takes > 40 seconds, but unless it is taking the backend > 38 seconds to rescale the pages, I can't see how this is the case.
I've munged the example below to remove sensitive data, but I can PM you the exact url if you need that to reproduce.
$ curl --silent -F src=http://user:pass@www.domain.com/draw_request_shared/4/6/ \
> -F username=<REMOVED> \
> -F key=<REMOVED> \
> -F page_layout=2 \
> -F width=11in \
> -F height=17in \
> -F html_zoom=80 \
> -F pdf_scaling_factor=.6 \
> -w %{http_code}-%{content_type} \
> -o curl.pdf http://pdfcrowd.com:80/api/pdf/convert/uri/
502-text/plain
$ cat curl.pdf
Sorry, we couldn't process your request.