# Uploading video file returns "Sorry, there was an error uploading that file. Please try again."

**URL:** <https://meta.discourse.org/t/uploading-video-file-returns-sorry-there-was-an-error-uploading-that-file-please-try-again/70963>\
**Category:** Self-hosting\
**Created:** [Setembro 28, 2017, 5:05pm UTC](https://meta.discourse.org/t/uploading-video-file-returns-sorry-there-was-an-error-uploading-that-file-please-try-again/70963 "2017-09-28T17:05:08Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![vaughajj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vaughajj/32/79628_2.png) [@vaughajj](https://meta.discourse.org/u/vaughajj)\
**Post date:** [Setembro 28, 2017, 5:05pm UTC](https://meta.discourse.org/t/uploading-video-file-returns-sorry-there-was-an-error-uploading-that-file-please-try-again/70963/1 "2017-09-28T17:05:08Z")

</div>

I set params: upload\_size: 500m in app.yml. Tried uploading a 153MB mp4 video and got the error message “Sorry, there was an error uploading that file. Please try again.” A 26.5MB mp4 video file uploads fine.

Checking the nginx conf file inside the docker container it is properly set to 500m.

When uploading the larger file, after reaching 100% transferred the %cpu on the discourse process jumps to 100%. Site is currently running on a Digital Ocean 8GB droplet.

from `production.log`

```
Started POST "/" for 108.253.248.44 at 2017-09-28 16:39:20 +0000
ActionController::RoutingError (No route matches [POST] "/")
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call'
Processing by ExceptionsController#not_found as HTML
  Parameters: {"RqRfk4mdN 9R2KtxVgGadDi0dwSNjAoyhViUJ07IhBlL74e8J6xNTDDONCo HBYPeVWcif9pCCcbgNjnaSN6QgVssKK1MlrIW9duc0rE0iVEc W2qi71kf6IBA7jGmTcszkhQuqBwIPVMzm6aK15K0apyjW/W/jyVndjZt3iagmPbYAPjCL L0Z0PhfXxBcfUDVsi3EQWlyfhO kHe8KqcGyXiy2O537tTTU8ZE1vFaDPgVPNRHqFyBZaIa1tgy571S 1x8Trha8xI8KEXEnNSniWIX1yLnVCN6kgPvr qDiaco2aWXUfTwaWSHX7GmCkoaKnNFDK8uPVmdJ7Ja9EZrckhI gTCMYiP7TSXxR0Mf/TpuDxPFhByAiV "=>nil}
Can't verify CSRF token authenticity.
  Rendering text template
  Rendered text template (0.0ms)
Filter chain halted as :verify_authenticity_token rendered or redirected
Completed 403 Forbidden in 2ms (Views: 0.8ms | ActiveRecord: 0.0ms)

```

from `nginx/error.log`

```plaintext
2017/09/28 16:38:00 [error] 56#56: *1022 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 134.xx.xx.xx, server: _, request: "POST /uploads.json?client_id=b629035fddbd408685a5e3c6b20da7d5&authenticity_token=u8Ws4JUFBBixpknfPfwkq9YprQVIwjIPie4yrlfao9KgkAPLE2rpdxxnjm556OpW55XlBWHR%2B4OMEBuoyusPPA%3D%3D HTTP/1.1", upstream: "http://127.0.0.1:3000/uploads.json?client_id=b629035fddbd408685a5e3c6b20da7d5&authenticity_token=u8Ws4JUFBBixpknfPfwkq9YprQVIwjIPie4yrlfao9KgkAPLE2rpdxxnjm556OpW55XlBWHR%2B4OMEBuoyusPPA%3D%3D", host: "174.138.109.18", referrer: "http://174.138.109.18/t/put-some-test-videos-here/13/27"`

```

Suggestions? I am trying to setup a site where students can submit videos for review and other students can comment on those videos with video. Unfortunately the use case doesn’t lend itself well to uploading to dropbox or youtube as the student work needs to be kept private and the class frequently uploads the movies directly from iOS devices lended out to them by our college so setting up Dropbox each time the devices were checked out won’t work.

And if there is a better platform to handle this amount of video feel free to chime in. I’m open to anything.

---

_[View the full topic](https://meta.discourse.org/t/uploading-video-file-returns-sorry-there-was-an-error-uploading-that-file-please-try-again/70963)._
