No such file or directory error with Sidekiq on Heroku

夙愿已清 提交于 2019-12-11 12:14:59

问题


I'm using the Sidekiq gem to do some background processing involving video files. On my local machine everything works fine but I'm getting the aforementioned error in production. I read about Heroku's ephemeral filesystem and sure enough I'd restarted Heroku so that could be the problem? If it is I don't know how to deal with it given that there is already a tmp folder in my app's root directory. This is the exact error I'm getting from my worker:

2015-09-09T21:41:37.859890+00:00 app[worker.1]: Errno::ENOENT: No such file or directory - /tmp/RackMultipart20150909-3-420sel.mp4

Any help will be greatly appreciated.


回答1:


You cannot share files between dynos. You'll need to upload to S3 and pass the S3 link to Sidekiq.



来源:https://stackoverflow.com/questions/32490336/no-such-file-or-directory-error-with-sidekiq-on-heroku

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!