Plugin seems to have lost servers/databases

Issue #52 new
Maxim Novikov created an issue

Look at the screenshot attached. There are 3 servers in the Object Explorer windows, I can run queries from the Query window, however, there is nothing in the HD's combo boxes.

What happened (user's view):

  1. I went home on Friday evening keeping the SSMS open (and probably the HD works that time, though I am not 100% positive; the HD window was collapsed)
  2. The SSMS had been open through all the weekend
  3. On Monday I came to work and start executing queries in the SSMS (no issues were faced)
  4. I had to find some table in a database and decided that it is easy to perform with the HD
  5. I pressed Ctrl-D and the HD widows popped up, but there were no servers and databases in there
  6. Clicking "Refresh" button changed nothing

What could actually have happened (developer's assumption):

  • Over the weekend all the server/database connections had been lost. The SSMS is trying to reconnect automatically (transparently for the user) when you start run queries or perform any other activities after a delay. But the HD just loses connections and never tries to restore them.

NB It might be quite an important issue as if you work with the SQL server, most likely you have the SSMS open all the time.

Comments (18)

  1. alex empty

    Refresh should have restored connection - even if they were lost. Need HuntingDog logs to see what is hapenning..

  2. Maxim Novikov reporter

    Log:

    2013-09-16 16:53:09.2875 ERROR [ServerWatcher] Thread server checker System.NullReferenceException: Object reference not set to an instance of an object.
       at HuntingDog.DogEngine.Impl.MyServer.get_ID()
       at HuntingDog.DogEngine.Impl.MyServer.GetHashCode()
       at System.Collections.Generic.ObjectEqualityComparer`1.GetHashCode(T obj)
       at System.Linq.Set`1.InternalGetHashCode(TElement value)
       at System.Linq.Set`1.Find(TElement value, Boolean add)
       at System.Linq.Enumerable.<ExceptIterator>d__99`1.MoveNext()
       at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       at HuntingDog.DogEngine.Impl.ServerWatcher.BackgroundThreadCheckServer()
    
  3. Maxim Novikov reporter

    PS Also, this error had been logging each 3 seconds for a couple of days while the SSMS was open, and now the log file is ~300Mb.

  4. Log in to comment