-
Notifications
You must be signed in to change notification settings - Fork 58
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
Gyoku is not threadsafe #29
Comments
can you provide an example hash to reproduce this problem? |
closing this because it can't be reproduced. feel free to reopen if you can provide code or a failing test. thanks. |
It happens only when we try to make savon requests in threads. Fails for exactly same reason. |
FYI we're using Savon in threads too. |
@pierre-schambacher did you find the cause of this? How are you managing with it? Its quite intermittent and not reproducible deterministically. |
@anandagrawal84 we're using this in a pulling system that gets called every few seconds. Since it does not happen very often and since we can miss a call, we haven't done anything. We just get a few errors now and then in NewRelic. |
We are getting the same error for a program we use. The following test reproduces the error on jruby 1.7.11 (1.9.3p392): require 'gyoku' def convert_all(array) array.map{|s| Gyoku.xml_tag s} end a = (1..20).map {|i| "hello_world#{i}".to_sym} threads = (1..200).map do |i| Thread.new do sleep 1 convert_all a end end threads.each {|t| t.join} puts "all done" |
Pretty sure I've been able to isolate this to using the My current understanding is that If someone is interested in issuing a pull request for this, I'd be more than happy to review and merge it! |
This thread has some insight into the underlying problem, and why |
Closing thanks to #46 and d329e39 -- this should be available in Gyoku v1.2.1. Thank you @perlun, @pschambacher and @kafkasbug for raising this issue! |
Sometimes when using gyoku through Savon we get an exception like so:
I'm not exactly sure why this happen, probably the result is not as gyoku expect it but a proper error would be nicer than a NoMethodError.
The text was updated successfully, but these errors were encountered: