I'm not sure if it's my setup causing this, but in my logs I see a 
connection that dies, but then Sequel continues trying to use the 
connection:

The following comes from recent logs.

You can see a batch of successful queries on the 28th just after 15:12.

D, [2020-01-28T15:12:59.206710 #12916] DEBUG -- : (0.000255s) (conn: 
1821020, server: default) SELECT SOMETHING, THIS WORKS
D, [2020-01-28T15:12:59.208963 #12916] DEBUG -- : (0.000073s) (conn: 
1821020, server: default) SELECT SOMETHING, THIS WORKS
D, [2020-01-28T15:12:59.211040 #12916] DEBUG -- : (0.000059s) (conn: 
1821020, server: default) SELECT SOMETHING, THIS WORKS
D, [2020-01-28T15:12:59.213096 #12916] DEBUG -- : (0.000112s) (conn: 
1821020, server: default) SELECT SOMETHING, THIS WORKS
D, [2020-01-28T15:12:59.214248 #12916] DEBUG -- : (0.000056s) (conn: 
1821020, server: default) SELECT SOMETHING, THIS WORKS
D, [2020-01-28T15:12:59.220084 #12916] DEBUG -- : (0.000073s) (conn: 
1821020, server: default) SELECT SOMETHING, THIS WORKS
D, [2020-01-28T15:12:59.226383 #12916] DEBUG -- : (0.000077s) (conn: 
1821020, server: default) SELECT SOMETHING, THIS WORKS

The system then becomes idle until the next morning at 8:19. It looks like 
the error connection fails (It does a SELECT NULL).

E, [2020-01-29T08:19:05.746825 #12916] ERROR -- : NoMethodError: undefined 
method `each' for false:FalseClass: (conn: 1821020, server: default) SELECT 
NULL
E, [2020-01-29T08:19:05.835454 #12916] ERROR -- : undefined method `each' 
for false:FalseClass (NoMethodError)
/home/aex/fno-interface-stage/vendor/bundle/ruby/2.7.0/gems/sequel-5.28.0/lib/sequel/adapters/tinytds.rb:153:in
 
`block in log_connection_execute'

After that the connection is still used. It's only discarded once I restart 
the whole process (A Sinatra webapp)

E, [2020-01-29T09:06:49.984170 #12916] ERROR -- : TinyTds::Error: DBPROCESS 
is dead or not enabled: (conn: 1821020, server: default) SELECT THAT NO 
LONGER WORKS
E, [2020-01-29T09:06:50.093014 #12916] ERROR -- : TinyTds::Error: DBPROCESS 
is dead or not enabled (Sequel::DatabaseDisconnectError)
/home/aex/fno-interface-stage/vendor/bundle/ruby/2.7.0/gems/sequel-5.28.0/lib/sequel/adapters/tinytds.rb:73:in
 
`execute'
--
E, [2020-01-29T09:09:20.555590 #12916] ERROR -- : TinyTds::Error: DBPROCESS 
is dead or not enabled: (conn: 1821020, server: default) SELECT THAT NO 
LONGER WORKS
E, [2020-01-29T09:09:20.673532 #12916] ERROR -- : TinyTds::Error: DBPROCESS 
is dead or not enabled (Sequel::DatabaseDisconnectError)
/home/aex/fno-interface-stage/vendor/bundle/ruby/2.7.0/gems/sequel-5.28.0/lib/sequel/adapters/tinytds.rb:73:in
 
`execute'
--
E, [2020-01-29T09:10:07.083798 #12916] ERROR -- : TinyTds::Error: DBPROCESS 
is dead or not enabled: (conn: 1821020, server: default) SELECT THAT NO 
LONGER WORKS
E, [2020-01-29T09:10:07.217110 #12916] ERROR -- : TinyTds::Error: DBPROCESS 
is dead or not enabled (Sequel::DatabaseDisconnectError)
/home/aex/fno-interface-stage/vendor/bundle/ruby/2.7.0/gems/sequel-5.28.0/lib/sequel/adapters/tinytds.rb:73:in
 
`execute'
--
and many more.

My connection setup is as follows:

DB.log_warn_duration = 0.5
DB.extension(:connection_validator)
DB.extension(:pagination)
DB.extension(:identifier_mangling)
DB.extension(:server_block)
DB.identifier_input_method = :downcase
DB.extension(:schema_caching)
DB.load_schema_cache?('./config/portal_schema.dump')
DB.extension(:server_logging)

The connection string has no additional settings. Just the host, username, 
password and DB name.

Thoughts?

J

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/08809d2d-2f45-4827-9377-5aa3bd3beb18%40googlegroups.com.

Reply via email to