Forum: Ruby on Rails attachment_fu and mysql

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
54fcb7cbc557b4248c80ec5375119e9c?d=identicon&s=25 Matt Cowley (matthewc)
on 2007-06-29 15:55
(Received via mailing list)
Hi folks,

I'm using attachment_fu to upload mp3 files to amazon s3.  The files
are between 1 and 5mb each.

Mostly it works fine, but about 1 in 4 uploads will fail, and once an
upload fails the app responds erratically, returning proxy errors and
slowing down overall.

It's apache/mongrel, with mysql db.  I'm watching the log scroll by as
I upload, and there are no errors thrown.

My only guess so far is that if the upload takes a while between
laptop to server and then server to amazon, mysql is vulnerable in the

Any ideas on tracking this down, or on how to protect the db during a
longish update?

controller code follows

thanks much
          @news_story = NewsStory.find_by_id(params[:id])
          @news_story_soundclip =[:news_story_soundclip])
            @news_story_soundclip.news_story_id =
            flash[:notice] = "Story changes saved."
            redirect_to :action => 'list'
            redirect_to :action => 'edit', :id => params[:id]
This topic is locked and can not be replied to.