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

SQL Server Timeout Error #119

Closed obissick closed 7 years ago

obissick commented 7 years ago

Getting this error after running for a long time.

Copying Thread (1074/1077): (10000/10000) 100% |ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:02 /home/obissick/.rvm/gems/ruby-2.3.0/gems/activerecord-sqlserver-adapter-4.2.15/lib/active_record/connection_adapters/sqlserver/database_statements.rb:352:in each': TinyTds::Error: Adaptive Server connection timed out: EXEC sp_executesql N'SELECT * FROM (ActiveRecord::StatementInvalid) ( SELECT TOP 10750000 *, ROW_NUMBER() OVER (ORDER BY (SELECT 1)) AS rnum FROM Thread ) Thread WHERE rnum > 10740000' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/activerecord-sqlserver-adapter-4.2.15/lib/active_record/connection_adapters/sqlserver/database_statements.rb:352:inhandle_to_names_and_values_dblib' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/activerecord-sqlserver-adapter-4.2.15/lib/active_record/connection_adapters/sqlserver/database_statements.rb:341:in handle_to_names_and_values' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/activerecord-sqlserver-adapter-4.2.15/lib/active_record/connection_adapters/sqlserver/database_statements.rb:316:in_raw_select' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/activerecord-sqlserver-adapter-4.2.15/lib/active_record/connection_adapters/sqlserver/database_statements.rb:311:in block in raw_select' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:inblock in log' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in instrument' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:inlog' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/activerecord-sqlserver-adapter-4.2.15/lib/active_record/connection_adapters/sqlserver/database_statements.rb:311:in raw_select' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/activerecord-sqlserver-adapter-4.2.15/lib/active_record/connection_adapters/sqlserver/database_statements.rb:260:insp_executesql' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/activerecord-sqlserver-adapter-4.2.15/lib/active_record/connection_adapters/sqlserver/database_statements.rb:19:in exec_query' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/activerecord-sqlserver-adapter-4.2.15/lib/active_record/connection_adapters/sqlserver/database_statements.rb:215:inselect' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:32:in select_all' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb:70:inselect_all' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/mongify-1.3.0/lib/mongify/database/sql_connection.rb:94:in select_paged_rows' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/mongify-1.3.0/lib/mongify/database/sql_connection.rb:85:inblock in select_rows' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.1/lib/active_support/core_ext/range/each.rb:7:in each' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.1/lib/active_support/core_ext/range/each.rb:7:ineach_with_time_with_zone' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/mongify-1.3.0/lib/mongify/database/sql_connection.rb:84:in select_rows' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/mongify-1.3.0/lib/mongify/translation/process.rb:29:inblock in copy_data' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/mongify-1.3.0/lib/mongify/translation/process.rb:28:in each' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/mongify-1.3.0/lib/mongify/translation/process.rb:28:incopy_data' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/mongify-1.3.0/lib/mongify/translation/process.rb:14:in process' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/mongify-1.3.0/lib/mongify/cli/command/worker.rb:68:inexecute' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/mongify-1.3.0/lib/mongify/cli/application.rb:28:in execute!' from /home/obissick/.rvm/gems/ruby-2.3.0/gems/mongify-1.3.0/bin/mongify:15:in<top (required)>' from /home/obissick/.rvm/gems/ruby-2.3.0/bin/mongify:23:in load' from /home/obissick/.rvm/gems/ruby-2.3.0/bin/mongify:23:in

' from /home/obissick/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in eval' from /home/obissick/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in
'

anlek commented 7 years ago

Hey @obissick, I think this has something to do with TinyTds's timeout settings. I haven't used TinyTds for over 7 years, so I don't remember how to fix this but google will know :)

Good luck, Andrew