浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

http://semetricmedia.com/our-team

 

very IMPORTANT article reference:http://blog.crowproductions.de/2009/09/11/controlling-solr-with-supervisord/

 

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:

[program:solr]
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/solr-logging.properties -jar start.jar

Now you just need to add the solr-logging.properties file with something like this as content:

# Default global logging level:
.level = WARNING

posted on 2010-09-24 00:17  lexus  阅读(209)  评论(0编辑  收藏  举报