-
Notifications
You must be signed in to change notification settings - Fork 151
Clearing credentials on disconnect could cause issues #288
Comments
Thanks. I worked on this a bit on my train today, I'll finish it up when I'm back at a computer in the morning and submit the pulls sometime tomorrow. |
@edejong can you point your app at |
Hey sorry for the late response, will try this weekend! |
Sounds good, thanks! |
So far it seems I can't even reproduce the bug with the main repo so I can't say anything sensible yet. I'll leave it overnight and see if it disconnects. It only happened after a long time of inaction so please bear with me ;) |
Ok I've been able to reproduce the bug with the old version, it just takes a bit longer for it to occur than it used to which is good to know. Now testing with your branch, let's give it a full day at least. |
Unfortunately it still seems to happen using your branch: failed with error 16540: "not authorized for insert on ..." |
@edejong any way you can log some more info? I'm a bit confused as to how it would not have logged in. Before, you had said that |
@jonhyman will add more info asap. Strangely I seem to be having a similar problem with mongoid 3+moped 1.5. I'm hosting on ObjectRocket and using rails and unicorn. With mongoid 4 I get the not authorized error after leaving the server running for a long time without traffic. But with mongoid 3 under the same circumstances I get documents not persisting to the database, without errors, in safe mode. If I refresh the page that creates the document a couple of times after a while they slowly start persisting, it seems as if every unicorn process silently fails once before working properly again. In some ways this is even worse as I have no way of knowing an insert succeeded besides manually checking after creation. No idea if it is mongoid or moped yet, will have to test further; it is a pain to test as I have to wait a long time for disconnects. Was the reconnect code in mongoid 2 rewritten? Almost seems to imply something else is going wrong for me... |
Do you have firewall rules which might be killing persistent connections Sent from my mobile device
|
closing this as #324 was merged and it should solve this issue |
On a failover retry, we could lose the credentials as they get cleared after a disconnect.
see
moped/lib/moped/failover/retry.rb
Line 27 in 62af32c
moped/lib/moped/connection.rb
Line 77 in 62af32c
cc @jonhyman
[related #286]
The text was updated successfully, but these errors were encountered: