crash saving attachment
11factory opened this issue · 0 comments
11factory commented
on v6.0.0 with a big Rails app and running a RSpec spec with file attachment, the app crash when running post_process
callback.
After lot of debugging I found the issue is coming from Paperclip::MediaTypeSpoofDetector
when trying to resolve the content type.
To resolve content type, paperclip is using Terrapin
gem - that gem is doing a fork
to run a call on hosting system but with a big rails app it crash, I think because a memory allocation issue.
As suggested by Terrapin adding posix-spawn
to my Rails app solves the problem because using posix spawn use far less memory than fork
.
I can do a PR with updated Readme is you think that could make sense.