Skip to content

Instantly share code, notes, and snippets.

@bbrowning
Last active June 8, 2016 21:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bbrowning/a6af5239ad35dcdd83212a729d6896c5 to your computer and use it in GitHub Desktop.
Save bbrowning/a6af5239ad35dcdd83212a729d6896c5 to your computer and use it in GitHub Desktop.
source 'https://rubygems.org'
gem 'multi_json'

Copy the Gemfile and test.rb into a directory.

Build jruby-openssl from master and run:

gem install pkg/jruby-openssl-0.9.17.dev-SNAPSHOT.gem
jruby -J-Xmx80m -J-XX:+HeapDumpOnOutOfMemoryError /path/to/test.rb

In my case, this OOMs and dumps a heap.

Now apply https://gist.github.com/bbrowning/759c7feff7f3d1d0d950b65bb12e10ed, rebuild jruby-openssl, and run:

gem install pkg/jruby-openssl-0.9.17.dev-SNAPSHOT.gem
jruby -J-Xmx80m -J-XX:+HeapDumpOnOutOfMemoryError /path/to/test.rb

After my changes this no longer OOMs.

gem 'jruby-openssl', '0.9.17.dev'
require 'bundler/cli'
Bundler::CLI.start(['install'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment