mardi 17 mars 2015

Upload of big file (> 1Go) fails with error "Errno::ENOSPC: No space left on device"

Rails 3.2.20, Ruby 1.9.3p194, Apache 2.2.22, Passenger 3.0.21.


File are uploaded to /tmp (that what I think when looking at the logs:



Parameters: {
...
@tempfile=#<File:/tmp/RackMultipart20150317-1329-19lcteh>>
...
}


)


Big file uploads (for instance for a 1.8Go file) raise the exception Errno::ENOSPC: No space left on device - write with the log trace:


/usr/local/lib/ruby/1.9.1/fileutils.rb:1372 :in `copy_stream` /usr/local/lib/ruby/1.9.1/fileutils.rb:1372 :in `block (2 levels) in copy_file` /usr/local/lib/ruby/1.9.1/fileutils.rb:1371 :in `open` /usr/local/lib/ruby/1.9.1/fileutils.rb:1371 :in `block in copy_file` /usr/local/lib/ruby/1.9.1/fileutils.rb:1370 :in `open` /usr/local/lib/ruby/1.9.1/fileutils.rb:1370 :in `copy_file` /usr/local/lib/ruby/1.9.1/fileutils.rb:477 :in `copy_file` /usr/local/lib/ruby/1.9.1/fileutils.rb:396 :in `block in cp` /usr/local/lib/ruby/1.9.1/fileutils.rb:1515 :in `block in fu_each_src_dest` /usr/local/lib/ruby/1.9.1/fileutils.rb:1531 :in `fu_each_src_dest0` /usr/local/lib/ruby/1.9.1/fileutils.rb:1513 :in `fu_each_src_dest` /usr/local/lib/ruby/1.9.1/fileutils.rb:395 :in `cp` [GEM_ROOT]/gems/paperclip-4.2.0/lib/paperclip/io_adapters/abstract_adapter.rb:41 :in `copy_to_tempfile` [GEM_ROOT]/gems/paperclip-4.2.0/lib/paperclip/io_adapters/uploaded_file_adapter.rb:8 :in `initialize`


I don't understand why because the partition where is the /tmp directory has plenty of available space:


Filesystem Size Used Avail Use% Mounted on rootfs 9.9G 4.9G 4.6G 52% /


There is no file size limit in the Apache configuration.


Aucun commentaire:

Enregistrer un commentaire