anlek / mongify

Mongify allows you to map your data from a sql database and into a mongodb document database.
http://github.com/anlek/mongify
MIT License
317 stars 82 forks source link

Adaptive Server connection timed out #156

Closed robertangeles closed 6 years ago

robertangeles commented 6 years ago

Hi. I tried my best in looking for a solution with this error. Anyone familiar with this?

robertangeles@c0363:~/DataMigration$ mongify process database.config properties.rb /home/robertangeles/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:354:in `each': TinyTds::Error: Adaptive Server connection timed out: EXEC sp_executesql N'SELECT COUNT(*) FROM mdb_properties' (ActiveRecord::StatementInvalid)

Thanks!

Rob

anlek commented 6 years ago

You can try increasing timeout (I'm not 100% sure it's possible) via your database connection:

sql_connection do
  adapter   "mysql"
  host      "localhost"
  username  "root"
  password  "passw0rd"
  database  "my_database"
  timeout   10000
end

Let me know if you have any issues.

robertangeles commented 6 years ago

Thanks @anlek. I discovered a small hack with client.rb of tiny_tds. I adjusted the timeout from 5 to 60.