I am running a rails application that has a webservice json request from a local client developed in C ++ (post command with multipart json form, download a streaming file)
I already read about Heroku docs about mesh routing , mentioned the limitation of Heroku's 30th for http connections and a long poll , citing working speakers.
During my call, I process PDF documents and insert a signature in them. These pdfs can be either 100 kb or 11 mb (or possibly more).
I understand that in the end I will have to do this action in the background, but I would like to avoid this before I fully had to.
Do you know any way to increase this timeout?
As you can see in my code below, I process my document after saving it (I did it inside after_save , but changed it to the controller, hoping to send a response before processing).
I would have expected the client to get a response before processing the document, but I still have a timeout on the hero side and an error on my client side.
All this works fine with smaller documents, but for a document with 121 pages of PDF only 400 KB, it is reset ..
At the end, my file is uploaded, so all I need is an answer to go to my client application before sending a timeout response ...
Any suggestions?
my mistake:
at=error code=H12 desc="Request timeout" method=POST path=/documents host=fierce-beach-2720.herokuapp.com fwd="81.193.155.217/bl4-155-217.dsl.telepac.pt" dyno=web.1 queue=0ms wait=0ms connect=1ms service=32272ms status=503 bytes=0
my controller:
respond_to do |format| if @document.save! format.html { redirect_to root_path, :flash => { :success => 'Document was successfully created.'} } format.json { render json: @document, status: :created, location: @document} @document.document_process