Welcome Guest | Login

Intermittent minimagic exceptions: "No such file or directory - /tmp/minimagic32193-6"

I swapped rmagick for minimagic in one of my applications lately because i read in various forums that rmagick suffers from memory leak problems, and i noticed my applications hanging sometimes.

Since making the swap I get intermittent exceptions thrown when my app processes uploaded images. So far I'm not sure what factors lead to the errors but they happen fairly regularly, and never happened while using rmagick. Here's an example:

A Errno::ENOENT occurred in work#update:

 No such file or directory - /tmp/minimagic32193-6
 [RAILS_ROOT]/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:339:in `size'
Does anyone have a clue as to what might be going wrong here? thanks!

2007-07-27 03:35 PM

When you say they happen "fairly regularly" does that mean you're able to predictably repeat the problem?  If so then have support take a look.  If not, you should hack the code to get your tmp files into railsapp/tmp instead of /tmp - perhaps that is causing the problem.  

2007-07-27 05:38 PM

Thanks william. I cant predictably recreate the problem, so i'll try adjusting attachment_fu to store the tmp files inside the application's directory an post back if it helps (or not).

2007-07-28 04:38 AM

I found this page that talks more about the problem (that more people are having). It seems to be a prob in the minimagic gem: http://ar-code.lighthouseapp.com/projects/35/tickets/6-race-condition-with-temp_file

Here's the page that explains how to patch minimagic to fix the problem http://rubyforge.org/tracker/index.php?func=detail&aid=9417&group_id=1358&atid=5365 but i'm not sure how and where to apply this patch.. could I include this code in my environment.rb somewhere perhaps?

2007-07-28 05:03 AM

You should just freeze the gem and apply the patch there in your vendor/ folder.  I guess the author hasn't applied this patch yet....too bad (seems pretty critical).  

2007-07-28 05:12 AM

I tried applying the mini_magic hack to a frozen version of the gem but the result was that, on the hostingrails server, newly uploaded images appeared to be missing (my app displayed the image missing icon when trying to display them).. although the application worked as expected locally (also in production mode) frustrating!

for the moment i'll probably set things back to the way they were when the intermittent errors where occurring. thanks for your help.

2007-07-28 07:26 AM

Hi Guys,

I think the author of this gem has fixed the problem.  I just downloaded the 1.2.3 release and this has been addressed.  Its not showing up on rubyforge release notes but if you download the gem its in the history.txt file.

You may also need to update attachment-fu if you are using it.
(see http://projects.wh.techno-weenie.net/changesets/2862)

I'm on Augustine and the gem version here is currently 1.2.0

Would it be possible to upgrade to 1.2.3 ?

Cheers,
Isaac

2007-07-29 06:07 PM

1.2.3 is already present on the server. You just need to uncomment the line,
RAILS_GEM_VERSION = '1.2.3' unless defined? RAILS_GEM_VERSION

If you want to install and freeze in your own home directory, please refer the link

http://www.hostingrails.com/forums/wiki_thread/2

2007-07-29 06:54 PM

Sorry for the confusion Varun but I'm talking about the mini_magick gem NOT the rails gem.

2007-07-29 07:01 PM

I've updated the gem mini_magick to mini_magick-1.2.3 on your server. Does that help ?

2007-07-29 10:33 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up today!