I have jruby-9.0.5.0 setup and i try to do some parallel processing using sidekiq. Everything works fine, except that if i use more than 12 sidekiq threads, i keep getting the following error message:
WARN: I18n::InvalidLocaleData: can not load translations from /Users/geroldboehler/.rvm/gems/jruby-9.0.5.0/gems/rails-i18n-4.0.5/lib/rails_i18n/../../rails/locale/ne.yml: java.lang.ArrayIndexOutOfBoundsException
WARN: /Users/geroldboehler/.rvm/gems/jruby-9.0.5.0/gems/i18n-0.7.0/lib/i18n/backend/base.rb:184:in `load_yml'
The line that causes this is the following:
I18n.t(".") unless I18n.backend.initialized?
display_names = I18n.backend.send(:translations)[:de][:shoptwist][:display_names]
I need to load the values stored in the translation yml and the second line causes the exception to occur. I have absolutely no clue why this is happening, it probably has to do something with simultaneous access / some weird multithreading problem.
Update
I should mention that this worked when i was using MRI ruby, the problem started when i switched to jruby.