attachment_fu and mysql

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 meantime.

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.update_attributes(params[:news_story])           @news_story_soundclip = NewsStorySoundclip.new(params[:news_story_soundclip])           if @news_story.save             @news_story_soundclip.news_story_id = @news_story.id             @news_story_soundclip.save             flash[:notice] = "Story changes saved."             redirect_to :action => 'list'           else             redirect_to :action => 'edit', :id => params[:id]           end