I have a HTML
form for uploading video files in Rails 5. I am using Carrierwave
with the standard generated uploader. Uploader with validation for file extension. When I try to upload large video files (2GB and more), I am getting this error:
Puma caught this error: failed to allocate memory (NoMemoryError)
This is full trace of the error:
Puma caught this error: failed to allocate memory (NoMemoryError) C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-2.0.3/lib/rack/multipart/parser.rb:186:in
on_read' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-2.0.3/lib/rack/multipart/parser.rb:72:in
block in parse' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-2.0.3/lib/rack/multipart/parser.rb:70:inloop' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-2.0.3/lib/rack/multipart/parser.rb:70:in
parse' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-2.0.3/lib/rack/multipart.rb:52:inextract_multipart' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-2.0.3/lib/rack/request.rb:472:in
parse_multipart' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-2.0.3/lib/rack/request.rb:335:inPOST' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-2.0.3/lib/rack/method_override.rb:39:in
method_override_param' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-2.0.3/lib/rack/method_override.rb:27:inmethod_override' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-2.0.3/lib/rack/method_override.rb:15:in
call' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-2.0.3/lib/rack/runtime.rb:22:incall' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/cache/strategy/local_cache_middleware.rb:27:in
call' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/executor.rb:12:incall' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-livereload-0.3.16/lib/rack/livereload.rb:23:in
_call' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-livereload-0.3.16/lib/rack/livereload.rb:14:incall' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/static.rb:125:in
call' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/rack-2.0.3/lib/rack/sendfile.rb:111:incall' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:522:in
call' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/puma-3.10.0/lib/puma/configuration.rb:225:incall' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/puma-3.10.0/lib/puma/server.rb:605:in
handle_request' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/puma-3.10.0/lib/puma/server.rb:437:inprocess_client' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/puma-3.10.0/lib/puma/server.rb:301:in
block in run' C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
I am using Windows 10
. For production I will switch to Linux
, but now I am developing in Windows. May be with Linux I will get same error, I don't know. How to upload large files with Carrierwave
(even more than 5GB) ?
Aucun commentaire:
Enregistrer un commentaire