Hi, Chelsea!

Out of memory errors only happen when the Linux kernel runs out of memory
and—as a last-gasp effort before crashing—tries to reclaim some memory by
killing a process that is deems is responsible for using a lot of memory.
The problem with Java's heap is that it just "takes it" all at once, and
that memory cannot be used by the OS or any other applications, including
cron jobs like the media filter.

You have apparently allocated 4GiB to Tomcat's Java heap, but I doubt you
need that much. I'd recommend using 150% of the number you see in DSpace's
control panel as "Used memory" and monitoring it. Then, in your media
filter and other background tasks, you can just set the JAVA_OPTS on the
command line or in your cron job:

JAVA_OPTS="-Xmx768M -Xms768M -Dfile.encoding=UTF-8"

Those are the settings we use in our cron tab, on a DSpace repository with
50,000 items. Other than that, we are only allocating 3GiB to Tomcat's Java
heap. I think this should suffice for you. You don't want to starve the OS
or other processes! Check the DSpace manual for a copy and paste-able
example crontab.

Also, you shouldn't have to restart Tomcat every day, that's not a
permanent solution—it's a temporary hack!

Alan

On Fri, Oct 2, 2015 at 6:50 PM, <[email protected]> wrote:

> Hi Andrea,
>
> I checked the Xms / Xms in [dspace]/bin/dspace and its set to 256M:
>  #Default Java to use 256MB of memory
>  JAVA_OPTS=-Xmx256m
>
> I checked the Java Information from the Control Panel and Runtime
> Statistics are reporting 4038 MiB and is consistent with the 4G set for
> Tomcat.
>
> I went back to the logs for more information. Java OOM errors are only
> happening when the media filter is running. Yesterday, our DSpace instance
> had to be restarted around 1:30pm. I see no information in the DSpace logs
> or Catalina logs relating to the crash (no errors). The only other error I
> see happening repeatidly in the dspace log is the following:
>
> 2015-01-10 21:12:13,700 ERROR
> org.dspace.app.xmlui.cocoon.DSpaceCocoonServletFilter @ Serious Error
> Occurred Processing Request!
> ClientAbortException:  java.net.SocketException: Broken pipe
>         at
> org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)
>         at
> org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
>         at
> org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:309)
>         at
> org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)
>         at
> org.apache.catalina.connector.Response.flushBuffer(Response.java:548)
>         at
> org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:279)
>         at
> javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java:166)
>         at
> org.apache.cocoon.servletservice.HttpServletResponseBufferingWrapper.flushBufferedResponse(HttpServletResponseBufferingWrapper.java:240)
>
> I'm new to supporting DSpace so I'm not sure what this error means, but
> none of the timestamps correlate to our crashes. Are there any other logs
> to look in to gain more information?
>
> I can try adding a heap dump to our JAVA_OPTS but since I am not seeing
> Java OOMS error outside of the media filter, I'm not sure how helpful it
> would be.
>
> - Chelsea
>
> --
> You received this message because you are subscribed to the Google Groups
> "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/dspace-tech.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Alan Orth
[email protected]
https://alaninkenya.org
https://mjanja.ch
"In heaven all the interesting people are missing." -Friedrich Nietzsche
GPG public key ID: 0x8cb0d0acb5cd81ec209c6cdfbd1a0e09c2f836c0

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to