Skip to content

Conversation

@kkrol89
Copy link

@kkrol89 kkrol89 commented Jul 14, 2012

If you run globally (without bundle)

sunspot-solr start
sunspot-solr stop

then java process with solr program is not killed properly and it still exists in processes list.

By running:

ps auxf

you can see that there are two processes created:

konrad    3301  0.0  0.0   4224   584 ?        Ss   11:32   0:00 sh -c java -Dsolr.data.dir\=/tmp -Dsolr.solr.home\=/home/konrad/.rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.3/solr/solr -jar start.jar
konrad    3304 17.0  2.3 1148712 69708 ?       Sl   11:32   0:03  \_ java -Dsolr.data.dir=/tmp -Dsolr.solr.home=/home/konrad/.rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.3/solr/solr -jar start.jar

Following command:

sunspot-solr stop

kills only the parent process (sh) and java process is still runing:

konrad    3304  2.4  2.3 1148712 69708 ?       Sl   11:32   0:03 java -Dsolr.data.dir=/tmp -Dsolr.solr.home=/home/konrad/.rvm/gems/ruby-1.9.3-p194/gems/sunspot_solr-1.3.3/solr/solr -jar start.jar

This commit fixes this problem. Now sunspot-solr stop command kills also all child processes of process which pid was saved.

@kpolitowicz
Copy link

Thanks for the pull request. I'm experiencing this problem running stop through bundle as well:

RAILS_ENV=staging bundle exec rake sunspot:solr:start
RAILS_ENV=staging bundle exec rake sunspot:solr:stop

leaves the java process alive.

@antonpaisov
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants