ruby on rails - Heroku intermittent H15 'Idle connection' error on upload action -


I have a Rail Code 4.1.5 on Ruby 4.1.1.

The app contains some media processing, and includes a JavaScript upload function using DropZone JS, which saves the picture on Amazon S3.

I am having a very depressing problem - from the intestine - and depending on the speed of Internet connection - Harakok is killing the upload process with Router H15 (passive connection) status. I do not believe that the connection is actually useless, as it is to use the same internet connection, I can upload similar files to other sites.

This web is not related to the timeout of the Dino, because the request never dies of Dino in these cases where the router closes it first.

What can be done here?

Note: I have implemented this Corse-Handling Technique:

Log:

[Timestamp] Horoko [Router]: AR = Error Code = H15 Desc = "idle connection" method = POST path = "/ console / breeds / 57-yamtel / photo" host = [host] request_id = 634d7680-8b66-4123-a4bc-fe78dc4e7b90 fwd = "[ip]" dyno = web 1 connect = 0ms service = 90232ms position = 503 bytes = 0

Procfile:

Web: bundle express rail server thin-p \ $ port -i \ $ RACK_ENV

Gemstones that can be relevant:

Mani 'thin'

Mani Bearer '

Mani' Wow Bravo 'Babber'

Mani 'rmagick', 'Rack-Corse',: Need => 'Rack / Corse'

Mani 'AJS-SDK' P> Gem 'Daemon'

Gem 'Exception_notification'

You need to upload large files from direct ly to S3 (or equivalent), not every one through your app. You can post the urn to your app (possibly using javascript), and then process background / s to S3.

This is unfortunately included.

It will be out if the first-byte back within 30 seconds, it will track a 55-second rolling window that at any time a byte is moved up or down.

In your case, I guess your upload sometimes takes longer than 30-seconds. Although you are processing the file as a background function, I guess you do not send a byte for the first time until upload is completed. Therefore intermittent timeout

In the same Haraku document mentioned above:

Many web applications allow users to upload files when these files are large, or the user is on a slow Internet connection , The upload can take longer than 30 seconds. For this, we recommend uploading directly to S3.

Selected Upload

I believe the solution is to use the HTTP upload where the first byte response Can be sent quickly (this is only supported with CIDR 1.1 and new, which supports the 55-second rolling window)

In fact, the chained approach is done directly by the S3 method I have never followed this for some reasons:

1) Harko, it should be an alternative And does not as.

2) It will be against general advice of Harkaku:

The best practice is to get the reaction time of your web application under 500 ms , It will free the application for further request and will provide a high quality experience to your visitors. 3) It (negatively, depending on my understanding, it can negatively affect the load balancing of Heroko), which is broken on the basis of primitive (or what you ask). ) It is possible.


Comments

  1. awesome post presented by you..your writing style is fabulous and keep update with your blogs Ruby on Rails Online Course Hyderabad

    ReplyDelete

Post a Comment

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -