Controlling Solr with supervisord

A while ago I found a solution to run Solr with supervisord, without leaking java processes, which you get when you use the generated solr-instance script with supervisord.

You need something like this in your supervisord.conf:

directory = ${solr-instance:jetty-destination}/..
command = java -jar start.jar
autostart = true
autorestart = true

The key is the directory option. With that the command is executed in that directory, which starts Solr correctly and doesn’t leave java processes when stopping it with supervisord.

I discovered today that Solr, when used with collective.recipe.solrinstance, by default logs every query to stdout.

The solution is to change the command like the following:

command = java -Djava.util.logging.config.file=${buildout:directory}/etc/ -jar start.jar

Now you just need to add the file with something like this as content:

# Default global logging level:
.level = WARNING
Published in: on September 11, 2009 at 8:10 pm  Comments (2)  

2 CommentsLeave a comment

  1. Hi!
    Thanks for the post.
    I was trying to run Solr with supervisord but when the Solr crashes the process don’t restart. Did it happen the same with you?

    • I never ran into that issue, but I didn’t have solr crashing so far.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: