Closed o-o00o-o closed 3 years ago
Duplicate of #348 and #349
How do you know the connection has dropped? Do you get an error or warning? Do you only see issues when attempting to run a query or does it happen when you alt-tab or click back on DAX Studio after using another app?
Can you have a look at starting DAX Studio with the diagnostic logging enabled, reproduce this issue and post the logs back to this issue along with some information on the rough time you noticed the need to reconnect? I don't currently have a good repro for this, I have access to one example model with over 11,000 measures and it only takes 5-8 seconds to load the metadata.
Are you seeing this same behaviour from other tools? How long does it take Power BI Desktop to connect to this model? Does it also loose the connection after a period of time?
So, this is what happened today. I did some queries on a connection. Went out for a few hours, came back and reran the query
Returned with an error Run, Connect and Refresh Metadata are all available (not greyed out)
When I ran query again, it did connect to the same database and did just run, so this is working as expected.
Not sure if this changed since the last version (I'd just upgraded to 2.11.1), but before I'm sure it always greyed out the run once it returned an error on the connection, so I was forced to use the Connect button again and that didn't connect back to the same Database
So now testing that, I then hit connect, it still changes the database to be a different database. Not sure why it chose the second one down from the list of available ones?
So I think perhaps the Run->Timeout->Run case is now solved,
Thinking about it, pretty much all AS tools ask you up front which database to connect to before they then try to load the metadata, so it would be good if DaxStudio worked the same way. Even so, it would be good for it to default to selecting the last one that you connected to. I think that would solve the other issue with it not connecting to the database that I want it to connect to (and having to wait while it picks the wrong one)
Power BI does take a while to load our model. I never remember it timing out on me
here is another case. I connected and went away and did something else. Now I am in the state where I can't do anything and this window is now useless as neither Run, Conect, Refresh Metadata is available
When I clicked the Help to get to the Issues list, it then did a metadata refresh (for some reason). But still neither Conect or Run are available
Really need to be able to just resume a broken connection rather than having to close the query and reopen (and again have to wait synchronously while the metadata is refreshed).
So that second issue is also logging a connection lost error also. So if I can build in an automatic re-connect mechanism this should fix both scenarios.
This should be fixed in the recent 2.13 release. I've completely re-built the internal connection management in order to incorporate automatic reconnection.
Describe the bug Right now, often the connection is dropped after a period of timeout. When I then reconnect on a server with multiple databases, usually my experience is that it will connect to a different database and not the one that I was previously connected to. This issue is made worse as DaxStudio forces the user to wait for metadata to be fully loaded before allowing any changes to database or executing any query. With a big cube with thousands of measures/columns that takes 45 seconds to connect and refresh metadata it means that if the connection is dropped, trying to reconnect to the same database again takes twice as long as it should and requires a carefully co-ordinated sequence of actions which feels very inefficient of time.
To Reproduce
Expected behavior
definitely the connect should remember the previously connected database and reconnect to that one if connected again
better would be that if I try to run a query on a connection that has since timed out, it should automatically reconnect and run the query without needing me to reconnect, wait 45 seconds for the loading of metadata, then running the query. At the moment I have to click, watch and wait, click, watch and wait then click. It would be great to get the machines to work for us .. until they enslave us for real that is! :)
It may be appropriate to log this as a separate bug, but additional expected behaviour would be that ideally the loading of metadata was done asynchronously so it is possible to switch databases before the metadata load is complete. Equally it should be possible to run the query before the metadata is complete. Surely the metadata is only required for syntax helping, not to issue the query and receive the results?
Screenshots NA
Additional context NA