ConnectionStatusChanged is not fired after server restart #17474
Replies: 7 comments 6 replies
-
I have a fairly stable recreate now - i have a simple console app connecting to a ravendb instance
I have this Console app running on 2 servers: 1 on the same network as the ravendb instance and the other on the ravendb instance itself. After restarting ravendb a few times (wait a few mins between restarts) eventually the Console app running over the network fails: (i.e. the console app not running on same server as ravendb) Are you able to provide any more info as to why this might be happening? Once its in this state it does not reconnect (and changes API no longer works; subscribers do not get changes) antivirus (symantec) was disabled for the duration of the test. |
Beta Was this translation helpful? Give feedback.
-
this is the state of |
Beta Was this translation helpful? Give feedback.
-
I have investigated this today and the culprit is the call to This call hangs 'sometimes' - the recreate is to connect to a server from win10 or windows 2012 (win 11 seems ok) and STOP the ravendb service. Adding console statements to your code i verified the reconnect attempts - interestingly the hang does not occur until ravendb is started. If you attempt the recreate do not simply restart ravendb - stop, wait 1min then start Proposed fix - add a timeout |
Beta Was this translation helpful? Give feedback.
-
Hi Can you upgrade both client & server to the latest RavenDB 5.4.111 and see if this fixes the issue ? |
Beta Was this translation helpful? Give feedback.
-
Hi Egor is it possible for you guys to review the fix I submitted for this issue and consider adding it in the next 5.4.x release? |
Beta Was this translation helpful? Give feedback.
-
hi, I tried to repro the issue using the code you sent, but it works. I used RavenDB Instance on cloud.ravendb.net and 2 Console app running on my local machine with this code:
I tried to wait 1 minute and, immediately restart both apps were reconnecting after start of the server. Can you send complete sample app that reproduce the issue ? or preferable a failing unit test: https://ravendb.net/docs/article-page/6.0/csharp/start/test-driver#complete-example |
Beta Was this translation helpful? Give feedback.
-
host/client: windows 10 here is a visual recreate: https://www.youtube.com/watch?v=DcDYG-PjKIk here is a video showing the hung ravendb task on the client https://www.youtube.com/watch?v=GopDU6a93co My summary is that you need to add a timeout to the |
Beta Was this translation helpful? Give feedback.
-
Hi Support we are observing some intermittent behavior in the changes API using 5.4.105 (client & server)
We have a windows process that has wired up
ConnectionStatusChanged
If we start out process then restart ravendb we consistently see the expected 2 logs statements
All good so far however we have run into an intermittent issue where the reconnect event is seemingly not fired if ravendb has been running for some time and we restart it - the
Connected:False
is logged but not the subsequentConnected:True
Has their been any changes/fixes in this component since 105? We reviewed your change log it doesnt appear so
We don't have a stable recreate as its intermittent but can also report that multiple subsequent restarts of ravendb do not then trigger any logging - its as if the event was never wired
Beta Was this translation helpful? Give feedback.
All reactions