Skip to content

Instantly share code, notes, and snippets.

@bbrowning
Last active Jun 8, 2016
Embed
What would you like to do?
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