0

We face this error from time to time in our production servers. This gets solved when we restart solr. But occurs again after few days.

Version information:

We are using both centos6 and centos7 machines, Centos6 is with java7 and centos7 is with java8.

solr: 5.5.5

        at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:607)
        at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:475)
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:257)
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:499)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.OutOfMemoryError: PermGen space```
Shreya Patni
  • 64
  • 1
  • 7
  • 2
    Does this answer your question? [Dealing with "java.lang.OutOfMemoryError: PermGen space" error](https://stackoverflow.com/questions/88235/dealing-with-java-lang-outofmemoryerror-permgen-space-error) – Uroš Aug 27 '20 at 03:22

2 Answers2

0

This info is in the WIKI: https://cwiki.apache.org/confluence/display/solr/Taking+Solr+to+Production#TakingSolrtoProduction-MemoryandGCSettings

SOLR_JAVA_MEM="-Xms10g -Xmx10g"

https://lucene.apache.org/solr/guide/8_5/jvm-settings.html

Abhijit Bashetti
  • 8,518
  • 7
  • 35
  • 47
0

It's either a memory leak within your Java application or your application sometimes needs more memory than it's allowed to allocate, or able to allocate.

java.lang.OutOfMemoryError: PermGen exactly says this.

Read this: https://www.javainuse.com/java/permgen

In short: Permgen is a part (a memory area) of the Java Virtual Machine were garbage collection isn't fully automatised.

Your local system admin should be able to handle an out of memory error.

Some suggestions for you anyway:

  1. Java7 and Java8 exist as 32bit and 64bit version, try to use the 64bit version.
  2. Check the memory usage of your Java Virtual Machine.
  3. Check also the memory usage of other applications running on the same machine.

If your Java Virtual Machine needs more and more memory over time, until it crashes, because it's out of memory, it's probably a program error, which has to be fixed by the programmer.

If your Java Virtual Machine varies a lot in its memory usage, and sometimes there's a high peak in memory usage, and that's causing the out of memory error, just install more memory into your machine.

EDIT: Abhijit Bashetti's answer looks very good, try this first :)

paladin
  • 765
  • 6
  • 13