OOME when uploading multiple images

View: New views
3 Messages — Rating Filter:   Alert me  

OOME when uploading multiple images

by Mike Lehmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've got an OOME when I tried to upload multiple smaller (< 100kB) images
with Pebble 2.4rc:

> java.lang.OutOfMemoryError: Java heap space
> at java.io.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:60)
> at org.apache.commons.fileupload.DeferredFileOutputStream.<init>(DeferredFileOutputStream.java:131)
> at org.apache.commons.fileupload.DefaultFileItem.getOutputStream(DefaultFileItem.java:558)
> at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:391)
> at net.sourceforge.pebble.web.action.UploadFileAction.process(UploadFileAction.java:95)
> at net.sourceforge.pebble.web.controller.HttpController.processRequest(HttpController.java:121)
> at net.sourceforge.pebble.web.controller.HttpController.doPost(HttpController.java:201)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
> at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
> at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
> at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
> at net.sourceforge.pebble.web.filter.DispatchingFilter.doFilter(DispatchingFilter.java:80)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> at net.sourceforge.pebble.web.filter.PreProcessingFilter.doFilter(PreProcessingFilter.java:183)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
> at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
> at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> at net.sourceforge.pebble.security.PrivateBlogSecurityInterceptor.invoke(PrivateBlogSecurityInterceptor.java:110)
> at net.sourceforge.pebble.security.PrivateBlogSecurityInterceptor.doFilter(PrivateBlogSecurityInterceptor.java:79)
> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)

Mike

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Pebble-user mailing list
Pebble-user@...
https://lists.sourceforge.net/lists/listinfo/pebble-user

Re: OOME when uploading multiple images

by Weiqi Gao-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mike,

Check your pebble configuration (pebble.properties) for the
fileUploadSize property.  The unit of that property is KB not byte.  I
had it set to 20000000 at one time.  And I received OOME every time I
tried to upload an image.  I lived with it for a while (after all, I can
just copy my images to the right directory manually) until one day I
decided to track down the problem.

Now my fileUploadSize is set to 10240, and everything works smoothly.

(This was with an older version of Pebble, and I'm not certain if it is
the same problem as yours.  It sure sounds similar enough that I just
want to throw my experience out there.  YMMV.)

--
Weiqi Gao
weiqigao@...
http://www.weiqigao.com/blog/


Mike Lehmann wrote:

> I've got an OOME when I tried to upload multiple smaller (< 100kB) images
> with Pebble 2.4rc:
>
>> java.lang.OutOfMemoryError: Java heap space
>> at java.io.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:60)
>> at org.apache.commons.fileupload.DeferredFileOutputStream.<init>(DeferredFileOutputStream.java:131)
>> at org.apache.commons.fileupload.DefaultFileItem.getOutputStream(DefaultFileItem.java:558)
>> at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:391)
>> at net.sourceforge.pebble.web.action.UploadFileAction.process(UploadFileAction.java:95)
>> at net.sourceforge.pebble.web.controller.HttpController.processRequest(HttpController.java:121)
>> at net.sourceforge.pebble.web.controller.HttpController.doPost(HttpController.java:201)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>> at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
>> at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
>> at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
>> at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
>> at net.sourceforge.pebble.web.filter.DispatchingFilter.doFilter(DispatchingFilter.java:80)
>> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>> at net.sourceforge.pebble.web.filter.PreProcessingFilter.doFilter(PreProcessingFilter.java:183)
>> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
>> at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
>> at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
>> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>> at net.sourceforge.pebble.security.PrivateBlogSecurityInterceptor.invoke(PrivateBlogSecurityInterceptor.java:110)
>> at net.sourceforge.pebble.security.PrivateBlogSecurityInterceptor.doFilter(PrivateBlogSecurityInterceptor.java:79)
>> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>> at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
>> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>> at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
>> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>
> Mike

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Pebble-user mailing list
Pebble-user@...
https://lists.sourceforge.net/lists/listinfo/pebble-user

Re: OOME when uploading multiple images

by Mike Lehmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

No, I hadn't changed any default image size. The 5 images I've tried to
upload at once were between 5k and 25k small. I'm now going to upload my
images/files using SFTP, but it's not understandable for me, that Pebble
can't handle such small images without crashing.

Does anybody knows an alternative to Pebble which also is Java-based and
stores the data as plain files on disk?

Mike


Weiqi Gao wrote:

> Mike,
>
> Check your pebble configuration (pebble.properties) for the
> fileUploadSize property.  The unit of that property is KB not byte.  I
> had it set to 20000000 at one time.  And I received OOME every time I
> tried to upload an image.  I lived with it for a while (after all, I can
> just copy my images to the right directory manually) until one day I
> decided to track down the problem.
>
> Now my fileUploadSize is set to 10240, and everything works smoothly.
>
> (This was with an older version of Pebble, and I'm not certain if it is
> the same problem as yours.  It sure sounds similar enough that I just
> want to throw my experience out there.  YMMV.)
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Pebble-user mailing list
Pebble-user@...
https://lists.sourceforge.net/lists/listinfo/pebble-user