Skip to content

Conversation

@jmdeldin
Copy link

We control our timeout via environment variables (worse – YAML) and had a silly bug in our code where the timeout was sent as a string. We kept running out of memory because the expires line was copying our string ("5") one billion times. D'oh!

This is just a simple fix to save new users like us some hassle.

I did run the js_spec.rb with this change, but I wasn't sure the preferred way (if any) of adding a test like this.

For others, this is what I did for a local Docker development setup:

# I added the base64 gem to the gemspec. I'm using Ruby 3.4-rc because concurrent ruby segfaults in 3.3.0.
% docker run -it -v $(pwd):/opt/app ruby:3.4-rc bash 
% bash ./scripts/install_nats.sh
% export PATH=$HOME/nats-server:$PATH
% nats-server &
% bundle install
% bundle exec rspec spec/js_spec.rb

We control our timeout via environment variables and had a silly bug in our code where the timeout was sent as a string. We kept running out of memory because the expires line was copying our string ("5") one billion times.

This is just a simple fix to save new users some hassle.
Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants