This is an archived forum post. The information may be outdated. Contact us if you have any
How to increase the time limit to make reuqest
wrote on 2014-03-09:
I am trying to convert an html page to pdf, generally my html page will be generated with a number of images on it which will take more than 1 min to process/load completely.
Here i am using django/python related code to convert html page to pdf like below
def generate_report_pdf(request, user_id):
# create an API client instance
client = pdfcrowd.Client("shiva", "xxxxxxxxxxxxxxxx")
# convert a web page and store the generated PDF to a variable
pdf = client.convertURI("http://hello.t.proxylocal.com/assessment/overview/362/")
# set HTTP response headers
response = HttpResponse(mimetype="application/pdf")
response["Cache-Control"] = "no-cache"
response["Accept-Ranges"] = "none"
response["Content-Disposition"] = "attachment; filename=com.pdf"
# send the generated PDF
except pdfcrowd.Error, why:
response = HttpResponse(mimetype="text/plain")
So when i tried to run this code i am getting the below error,
510 - Timed out. Can't load the specified URL.
List of the resources that can't be loaded:
If a request takes more than 40 seconds to complete it is cancelled and either of these messages may be returned:
510 - 413 Timed out. Can't load the specified URL.
502 - Sorry, we couldn't process your request.
So in my case because of it is taking more time to download/process the data to generate the page it is displaying the above error,
So is there any chance to increase the Time Limit in Pdfcrowd ? so that it can take time to process/load my complete page ?
wrote on 2014-03-10:
Unfortunately, it is not possible to increase the time limit. I would recommend that you try to serve the images from a faster server which should improve the loading time of your HTML page.