Hi All, I''m hosting with MediaTemple who are currently using 0.3.3 of mongrel on their GridServer. My rails app has an image upload facility whereby if you upload a large image (e.g. 5Mb) mongrel crashes. I''ve requested an upgrade to the latest version of mongrel but don''t believe that''s going to happen too soon. I''m not getting too much information in the log files too pass on, other than what appears to be a memory allocation error (my container is 64Mb). Any ideas? Regards, Serdar
>From my understanding its not good practice to use rails for largefile uploads because it locks the thread up. Maybe look into integrating merb into your app to handle the file uploads. I don''t know if that will fix your problem or not, but it will improve your performance. Craig On 4/3/07, Serdar Kilic <serdar at kilic.net> wrote:> Hi All, > I''m hosting with MediaTemple who are currently using 0.3.3 of mongrel > on their GridServer. My rails app has an image upload facility > whereby if you upload a large image (e.g. 5Mb) mongrel crashes. I''ve > requested an upgrade to the latest version of mongrel but don''t > believe that''s going to happen too soon. I''m not getting too much > information in the log files too pass on, other than what appears to > be a memory allocation error (my container is 64Mb). Any ideas? > > Regards, > Serdar > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >
On Tue, 3 Apr 2007 23:12:13 +1000 Serdar Kilic <serdar at kilic.net> wrote:> Hi All, > I''m hosting with MediaTemple who are currently using 0.3.3 of mongrel > on their GridServer. My rails app has an image upload facility > whereby if you upload a large image (e.g. 5Mb) mongrel crashes. I''ve > requested an upgrade to the latest version of mongrel but don''t > believe that''s going to happen too soon. I''m not getting too much > information in the log files too pass on, other than what appears to > be a memory allocation error (my container is 64Mb). Any ideas?Mongrel isn''t crashing, most likely you have too little RAM and the linux oomkiller is killing Mongrel off when it gets too big. Take your app, put it on a computer with lots of ram, and then try a bunch of giant uploads to make sure. Then, if it still works simply go buy more RAM from MT. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/
Thanks Guys for the thoughts and ideas - I''ll have a look at merb as Craig suggested as I''m currently running the default setup of 64mb for rails (only 1 app running) and if a single file upload is causing me to run out of memory then that is troublesome. FWIW, I replaced my own file upload code with that of recipe 57 if you have the Rails Recipe book, but the issue is there as well, so it possibly could be a rails related issue. On 04/04/07, Zed A. Shaw <zedshaw at zedshaw.com> wrote:> > > Mongrel isn''t crashing, most likely you have too little RAM and the > linux oomkiller is killing Mongrel off when it gets too big. Take your > app, put it on a computer with lots of ram, and then try a bunch of > giant uploads to make sure. Then, if it still works simply go buy more > RAM from MT. > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > > -- > Cheers, > Serdar K?l?? > http://weblog.kilic.net/-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070404/902c89d0/attachment-0001.html