activerecord-jdbc-adapter icon indicating copy to clipboard operation
activerecord-jdbc-adapter copied to clipboard

Azure sql timeout problems

Open skunath opened this issue 10 years ago • 4 comments

I'm writing as I've been having serious issues maintaining connections to an azure sql database.

I'm running a rails app that uses the activerecord-jdbcmssql-adapter to connect to an azure sql server instance.

Basically, every so often the entire apps halts for a number of minutes. It seems like I'm experiencing an issue similar to the hanging issue mentioned in https://github.com/rails-sqlserver/tiny_tds/issues/138 .

Has anyone experienced this issue or have any ideas for workarounds?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/2612913-azure-sql-timeout-problems?utm_campaign=plugin&utm_content=tracker%2F136963&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F136963&utm_medium=issues&utm_source=github).

skunath avatar Jun 11 '14 18:06 skunath

thanks, we're pretty low on MS-SQL maintainers. since ActiveRecord 4.x our test suite has been dead-locking whenever the transaction isolation gets changed (if I recall correctly e5f3cd8f8341f7f392c1d8) ... maybe that helps, although I do think this is going to be something completely different esp. if you're able to reproduce on MRI as well. an idea for a work-around would be to use MS' SQL-JDBC driver instead of jTDS.

kares avatar Jun 16 '14 09:06 kares

Tried the MS JDBC driver and having the problem. From what I understood Azure sql doesn't allow for a TDS connection.

I read some things that seem to suggest Azure times out all connections after 30 minutes. Not sure if that's entirely correct, but as a result of that I ended up having each session kick off a new database connection. Terrible idea, but at least the application isn't hanging after some number of minutes running now.

skunath avatar Jun 16 '14 13:06 skunath

I'm using tiny_tds also with activerecord-sqlserver-adapter for sql azure 2013. I used to experience timeout. i don't know what to do.....

lethunder avatar Jun 26 '14 21:06 lethunder

i've install the pre beta version but i'm still facing timeout issues

lethunder avatar Jul 02 '14 09:07 lethunder