You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by dshih <ds...@tableau.com> on 2018/08/24 22:52:35 UTC

passing opts to all java calls in solr/solr.cmd

SOLR 7.4.0

We recently encountered an issue on Windows where the cleanup/uninstall
processes for our product were having difficulties deleting "hsperf"
directories created in SOLR's data directory. Somehow, these directories
ended up with permissions preventing anyone from deleting them. Further
investigation revealed that they are actually created by a JVM feature,
jvmstat, which can be disabled via "-XX:-UsePerfData".

Unfortunately, adding that to SOLR_OPTS is insufficient, because that
variable is only passed to the start command.  At least in solr.cmd, there
are other java calls that apparently result in the creation of these hsperf
directories.

For now, we have simply added "-XX:-UsePerfData" to all java calls in
solr.cmd to work around the problem. But that is not great, as we would need
to make the same changes to solr.cmd every time we upgraded SOLR. It would
be nice if there was some way to pass JVM options to all java calls launched
by solr.cmd (and the linux solr script).  Would this be worth a
lower-priority bug?



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: passing opts to all java calls in solr/solr.cmd

Posted by Jan Høydahl <ja...@cominvent.com>.
Hi

Sounds like it would be worth a low-pri issue. And it would be great if you guys could experiment to find the necessary changes and then contribute a patch back to the project, which we will then commit :)

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

> 25. aug. 2018 kl. 00:52 skrev dshih <ds...@tableau.com>:
> 
> SOLR 7.4.0
> 
> We recently encountered an issue on Windows where the cleanup/uninstall
> processes for our product were having difficulties deleting "hsperf"
> directories created in SOLR's data directory. Somehow, these directories
> ended up with permissions preventing anyone from deleting them. Further
> investigation revealed that they are actually created by a JVM feature,
> jvmstat, which can be disabled via "-XX:-UsePerfData".
> 
> Unfortunately, adding that to SOLR_OPTS is insufficient, because that
> variable is only passed to the start command.  At least in solr.cmd, there
> are other java calls that apparently result in the creation of these hsperf
> directories.
> 
> For now, we have simply added "-XX:-UsePerfData" to all java calls in
> solr.cmd to work around the problem. But that is not great, as we would need
> to make the same changes to solr.cmd every time we upgraded SOLR. It would
> be nice if there was some way to pass JVM options to all java calls launched
> by solr.cmd (and the linux solr script).  Would this be worth a
> lower-priority bug?
> 
> 
> 
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html