You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using Kubernetes to run Hyrax. I updated the cache_dir and storage_dir to use a volume with more than enough space. However, for very large files, I'm getting an "no space left on device" error.
It seems CarrierWave is trying to copy the file in the cache_dir before Bulkrax can ingest it. I've read about other people having issues with using copy_stream.
Is there a way to override CarrierWave so it doesn't do a copy? Does it need to do a copy in the first place?
Errored at: 2024-03-14 20:53:23 UTC
Error: Errno::ENOSPC - No space left on device - sendfile
Seems like the CarrierWave::sanitize_file(file) gets run twice. Once with the CarrierWave.cache_dir and one with the Hyrax::UploadedFileUploader.cache_dir. So:
First run, the file is being copied to Rails Application Root /tmp file then the second run, it uses the correct cache_dir...
So, I had to overwrite lib/carrierwave/uploader/cache.rb and changed the cache_dir there.
We are using Hyrax 3.6.0 and Bulkrax 5.5.1.
We are using Kubernetes to run Hyrax. I updated the cache_dir and storage_dir to use a volume with more than enough space. However, for very large files, I'm getting an "no space left on device" error.
It seems CarrierWave is trying to copy the file in the
cache_dir
before Bulkrax can ingest it. I've read about other people having issues with usingcopy_stream
.Is there a way to override CarrierWave so it doesn't do a copy? Does it need to do a copy in the first place?
Errored at: 2024-03-14 20:53:23 UTC
Error: Errno::ENOSPC - No space left on device - sendfile
Error Trace:
/usr/local/lib/ruby/2.7.0/fileutils.rb:1416:in
copy_stream' /usr/local/lib/ruby/2.7.0/fileutils.rb:1416:in
block (2 levels) in copy_file'/usr/local/lib/ruby/2.7.0/fileutils.rb:1415:in
open' /usr/local/lib/ruby/2.7.0/fileutils.rb:1415:in
block in copy_file'/usr/local/lib/ruby/2.7.0/fileutils.rb:1414:in
open' /usr/local/lib/ruby/2.7.0/fileutils.rb:1414:in
copy_file'/usr/local/lib/ruby/2.7.0/fileutils.rb:511:in
copy_file' /usr/local/lib/ruby/2.7.0/fileutils.rb:430:in
block in cp'/usr/local/lib/ruby/2.7.0/fileutils.rb:1589:in
block in fu_each_src_dest' /usr/local/lib/ruby/2.7.0/fileutils.rb:1605:in
fu_each_src_dest0'/usr/local/lib/ruby/2.7.0/fileutils.rb:1587:in
fu_each_src_dest' /usr/local/lib/ruby/2.7.0/fileutils.rb:429:in
cp'/usr/local/bundle/gems/carrierwave-1.3.3/lib/carrierwave/sanitized_file.rb:234:in
copy!' /usr/local/bundle/gems/carrierwave-1.3.3/lib/carrierwave/sanitized_file.rb:224:in
copy_to'/usr/local/bundle/gems/carrierwave-1.3.3/lib/carrierwave/uploader/cache.rb:134:in
cache!' /usr/local/bundle/gems/carrierwave-1.3.3/lib/carrierwave/mounter.rb:44:in
block in cache'/usr/local/bundle/gems/carrierwave-1.3.3/lib/carrierwave/mounter.rb:42:in
map' /usr/local/bundle/gems/carrierwave-1.3.3/lib/carrierwave/mounter.rb:42:in
cache'/usr/local/bundle/gems/carrierwave-1.3.3/lib/carrierwave/mount.rb:146:in
file=' /usr/local/bundle/gems/carrierwave-1.3.3/lib/carrierwave/orm/activerecord.rb:70:in
file='/usr/local/bundle/gems/bulkrax-5.5.1/app/models/concerns/bulkrax/file_factory.rb:129:in
import_file' /usr/local/bundle/gems/bulkrax-5.5.1/app/models/concerns/bulkrax/file_factory.rb:121:in
block in import_files'/usr/local/bundle/gems/bulkrax-5.5.1/app/models/concerns/bulkrax/file_factory.rb:121:in
map' /usr/local/bundle/gems/bulkrax-5.5.1/app/models/concerns/bulkrax/file_factory.rb:121:in
import_files'/usr/local/bundle/gems/bulkrax-5.5.1/app/models/concerns/bulkrax/file_factory.rb:16:in
upload_ids' /usr/local/bundle/gems/bulkrax-5.5.1/app/models/concerns/bulkrax/file_factory.rb:23:in
file_attributes'/usr/local/bundle/gems/bulkrax-5.5.1/app/factories/bulkrax/object_factory.rb:264:in
transform_attributes' /usr/local/bundle/gems/bulkrax-5.5.1/app/factories/bulkrax/object_factory.rb:124:in
create'/usr/local/bundle/gems/bulkrax-5.5.1/app/factories/bulkrax/object_factory.rb:59:in
block in run' /usr/local/bundle/gems/activesupport-5.2.8.1/lib/active_support/notifications.rb:170:in
instrument'/usr/local/bundle/gems/bulkrax-5.5.1/app/factories/bulkrax/object_factory.rb:59:in `run'
The text was updated successfully, but these errors were encountered: