"Failed to reserve shared memory."

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

"Failed to reserve shared memory."

TK Solr
My client is having a sudden death syndrome of Solr 8.3.1. Solr stops responding
suddenly and they have to restart Solr.
(It is not clear if the Solr/jetty process was dead or alive but not responding.
The OOM log isn't found.)

In the Solr start up log, these three error messages were found:

OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory. (error = 12)
OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory. (error = 12)

I am wondering if anyone has seen these errors.


I found this article

https://stackoverflow.com/questions/45968433/java-hotspottm-64-bit-server-vm-warning-failed-to-reserve-shared-memory-er

which suggests removal of the JVM option -XX:+UseLargePage, which is added by
bin/solr script if GC_TUNE is not defined. Would that be a good idea? I'm not
quite sure what kind of variable GC_TUNE is. It is used as in:

   if [ -z ${GC_TUNE+x} ]; then
...

         '-XX:+AlwaysPreTouch')
   else
     GC_TUNE=($GC_TUNE)
   fi

I'm not familiar with *${*GC_TUNES*+x}* and*($*GC_TUNE*)* syntax. Is this a
special kind of environmental variable?


TK



Reply | Threaded
Open this post in threaded view
|

Re: "Failed to reserve shared memory."

TK Solr
I added these lines to solr.in.sh and restarted Solr:

  GC_TUNE=('-XX:+UseG1GC' \
    '-XX:+PerfDisableSharedMem' \
    '-XX:+ParallelRefProcEnabled' \
    '-XX:MaxGCPauseMillis=250' \
    '-XX:+AlwaysPreTouch' \
    '-XX:+ExplicitGCInvokesConcurrent')

According to the Admin UI, -XX:+UseLargePage is gone, which is good but all
other -XX:* except -XX:+UseG1GC are also gone.

What is the correct way to remove just -XX:UseLargePage ?

TK

On 1/6/21 3:42 PM, TK Solr wrote:

> My client is having a sudden death syndrome of Solr 8.3.1. Solr stops
> responding suddenly and they have to restart Solr.
> (It is not clear if the Solr/jetty process was dead or alive but not
> responding. The OOM log isn't found.)
>
> In the Solr start up log, these three error messages were found:
>
> OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory. (error = 1)
> OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory. (error = 12)
> OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory. (error = 12)
>
> I am wondering if anyone has seen these errors.
>
>
> I found this article
>
> https://stackoverflow.com/questions/45968433/java-hotspottm-64-bit-server-vm-warning-failed-to-reserve-shared-memory-er 
>
>
> which suggests removal of the JVM option -XX:+UseLargePage, which is added by
> bin/solr script if GC_TUNE is not defined. Would that be a good idea? I'm not
> quite sure what kind of variable GC_TUNE is. It is used as in:
>
>   if [ -z ${GC_TUNE+x} ]; then
> ...
>
>         '-XX:+AlwaysPreTouch')
>   else
>     GC_TUNE=($GC_TUNE)
>   fi
>
> I'm not familiar with *${*GC_TUNES*+x}* and*($*GC_TUNE*)* syntax. Is this a
> special kind of environmental variable?
>
>
> TK
>
>
>
>