Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolate ruby environment and set java heap size #1533

Merged
merged 1 commit into from
Oct 9, 2014
Merged

Isolate ruby environment and set java heap size #1533

merged 1 commit into from
Oct 9, 2014

Conversation

jordansissel
Copy link
Contributor

  • Clear GEM_HOME and GEM_PATH variables to ensure we are only using
    the gems baked into the kibana jar and don't accidentally use
    the user/system's gem paths (Fixes Mixed ruby environment makes bin/kibana fail to load puma #1531)
  • Set JVM heap size to 512m. If we don't do this, the default (for the
    common JVMs) is 25% of system ram, which is not a desirable default.

@jordansissel
Copy link
Contributor Author

Testing this - failed.

Currently fails loading puma/puma_http11 but this file is a shared object (?) under here. Which is weird. I"m looking into how this got built so I can fix it.

% jar tf lib/kibana.jar | grep puma/puma
gems/puma-2.9.0/lib/puma/puma_http11.so

@jordansissel
Copy link
Contributor Author

I seem to have resolved my build problem by having the environment ruby be jruby during grunt build - is this expected?

Either way, here's test results:

  • master:
% bin/kibana
The Kibana Backend is starting up... be patient
LoadError: no such file to load -- puma/puma_http11
  • this PR (success!)
% bin/kibana
The Kibana Backend is starting up... be patient
{"@timestamp":"2014-10-06T19:31:33+00:00","level":"INFO","name":"Kibana","message":"Kibana server started on tcp://0.0.0.0:5601 in production mode."}

@rashidkpc
Copy link
Contributor

Yeah probably expected, since your system ruby is probably 2.1.x and jruby is 1.9.3 and thy probably don't share gems and such. We'll check out the pull!

@rashidkpc rashidkpc self-assigned this Oct 6, 2014
export GEM_HOME=
export GEM_PATH=

KIBANA_VERSIO=@@version CONFIG_PATH=${DIR}/../config/kibana.yml RACK_ENV=production exec "${JAVA}" $JAVA_OPTS -jar "${DIR}/../lib/kibana.jar" "$@"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo here? KIBANA_VERSION => KIBANA_VERSIO

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

facepalm

* Clear GEM_HOME and GEM_PATH variables to ensure we are only using
  the gems baked into the kibana jar and don't accidentally use
  the user/system's gem paths (Fixes #1531)
* Set JVM heap size to 512m. If we don't do this, the default (for the
  common JVMs) is 25% of system ram, which is not a desirable default.
@jordansissel
Copy link
Contributor Author

Fixed and repushed as a single commit.

@w33ble
Copy link
Contributor

w33ble commented Oct 8, 2014

I tried to test this, but I couldn't get the reported error to happen, no matter what local version of ruby I installed, so I couldn't verify that it goes away

rashidkpc added a commit that referenced this pull request Oct 9, 2014
Isolate ruby environment and set java heap size
@rashidkpc rashidkpc merged commit 1af8b3f into elastic:master Oct 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mixed ruby environment makes bin/kibana fail to load puma
3 participants