Tuesday, December 22, 2009

Re: [Rails] Rails/JRuby WAR Heap Space Issue

On Tue, Dec 22, 2009 at 8:59 AM, MichaelF <michael@fromin.org> wrote:
> I am using JRuby / Rails / Glassfish Gem to run an app on Tomcat.

OK, never mind the previous comment -- looking at the stack trace
it's obviously Tomcat.

> When someone submits a large file as an uploaded file I see the
> following in the log:
>
> Processing ScholarshipsController#create (for 174.120.167.34 at
> 2009-12-21 10:03:13) [POST]
>  Parameters:
> {"authenticity_token"=>"9c26734a0f31...bf3a9d644e9001abb931",
> "scholarship"=>{...data removed for privacy...}
>
> Dec 21, 2009 10:03:15 AM org.apache.catalina.core.StandardWrapperValve
> invoke
> SEVERE: Servlet.service() for servlet default threw exception
> java.lang.OutOfMemoryError: Java heap space

> Is this issue caused on the upload itself or when the file is
> attempting to be persisted to MySQL?  Is it caused when the file is
> uploaded but not yet persisted?

Are you really saving a file to MySQL? Not usually recommended.

> What is the best way to address this?  Can I limit the size of the
> file uploaded?

Probably -- what are you using to handle the upload now?

> I currently have 64MB heap space -

Regardless of anything else, that seems awfully low. What are the
startup params for Tomcat?

Have you tried uploading to a local instance with more memory?

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan

--

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate