-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Work with @bindings is not thread-safe #2942
Comments
@romikoops I'm seeing a similar issue too I think, intermittently @bindings is nil. Did you work out a fix? |
@dedman Hello, I have not worked on that yet. To fix that, it is required to refresh knowledge about tread safe coding, learn how Puma deals with thread and at the end to understand how to fix it in Rails admin. I expected to have some help from community who knows it better than me. Anyway, I can not wait and will start to work on that at the end of this week. |
I just moved to Thin web server and problem has gone. I will not close the issue, probably it will be fixed by somebody. |
I'm seeing this issue as well using Puma. Any suggestions on how to fix this without moving to Thin? |
I'm having the same problem with Thin and EM-Synchrony (which uses Fibers instead of Threads, but suffers from the same RailsAdmin design problem). I hacked together a solution that monkey-patches Proxyable to use Thread/Fiber-local variables. This seems to work in my case (with RailsAdmin v0.7), and should also work in threaded environments (YMMV):
|
Is anyone else having this issue? I am, and it's strange to me that such a popular gem would have this issue with Puma (which is also very popular) yet not many others are encountering this? |
I am seeing something potentially similar on Puma as well, where the value of |
Based on railsadminteam#2942 (comment) Fixes railsadminteam#2897, Fixes railsadminteam#2942
@mshibuya was this fix put into a released version of the gem? |
Yes, it's there since the 2.0.0 release. |
I use rails 5.1 application with Puma as a web server by default.
I have loosing original value of @bindings on opening for edit an entity with big amount of associated records (it is core feature of my app). I tried to debug and see the problem happens here https://github.com/sferik/rails_admin/blob/master/lib/rails_admin/config/proxyable/proxy.rb#L22
When I start my web application with single thread, I never had exception
When I start it by default with 5 threads, then it randomly generates this error:
The text was updated successfully, but these errors were encountered: