I have connect MB with SQL Server 2012 and could generate reports. Unfortunately connectivity with SQL server is not disconnect when we are not using it. This cause frees SQL processes. I tried with different servers and DBs. Is there any configuration that could time out or disconnect session in MB?
@ruwanj
I think currently the only way to get around this is to kill the connection or restart Metabase.
Are you saying that Metabase is causing the database to hang?
You might want to look at the Metabase logs to see if there’s any warnings/errors.
MS SQL Server has no process to automatically timeout connections. People do run processes that stop unused processes, but they’re not recommended as they can cause other problems.
In general, the SQL processes don’t matter. If you’re SQL Server is so starved of memory for them to be a problem, then you’ll probably be having other issues too.
What’s the specification of your server?
No, you’d need to rewrite the driver. Assuming you don’t have a monster database on there, you shouldn’t be having any problems.
I run a tiny sample DB Server with just 2GB RAM. Metabase keeps its connection open but never causes a problem.
I think your issue is elsewhere, but my skills are in writing SQL etc rather than database configuration. Might be worth a try on a SQL Server forum.
It shouldn’t matter. An idle connection is just that.
If what you’re saying is that the original query killed the database, then that’s a different problem all together.
It may only appear to be 1000 records, but it’s quite possible that SQL has had to scan the entire table to retrieve those 1000.
If that is the case, convert you question to SQL. Copy the SQL into SSMS and take a look at the query plan.
Those are optimized sql (views). When we run in Mb records (Questions) comes withing a few seconds. It is not an issue. Issue will come when it keep connection with SQL server and freeze the SQL process that call from other applications. When we stop the Mb, applications are working back.
Sorry, no idea. Sounds very odd. Is there a record lock or something? There’s no way that there should be a problem.
Is it just one view that causes the problem? What happens if you have a trivial question on just one small table (not a view)?