Reputation: 1035
When trying to upload a csv file on our system I'm getting the folllowing error:
Errno::ENOENT: No such file or directory @ rb_sysopen - /tmp/RackMultipart20191126-93-k4s94s.csv
The code works fine locally but fails intermittently fails on production.
I'm not sure how I debug this, for example how would I view the /tmp/ directory on Heroku?
Upvotes: 0
Views: 238
Reputation: 343
Heroku uses ephemeral filesystem (link1,link2) which might be causing this issue.
For debugging, you could rescue for system calls exception and log the contents of tmp directory with timestamps of last modified. This could help in getting to know if the tmp folder was cleaned during the execution of your code.
Upvotes: 1