Hello Mr. Evans,
I still get the same error after some days of inactivity.
Here's an interesting log output:
[api] [ERROR] [2021-09-20 14:00:09 +0200] NoMethodError: undefined method
`each' for false:FalseClass: SELECT NULL
NoMethodError: undefined method `each' for false:FalseClass
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/adapters/tinytds.rb:154:in
`block in log_connection_execute'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/database/logging.rb:43:in
`log_connection_yield'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/adapters/tinytds.rb:154:in
`log_connection_execute'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/database/connecting.rb:289:in
`valid_connection?'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/extensions/connection_validator.rb:104:in
`block in acquire'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/extensions/connection_validator.rb:100:in
`times'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/extensions/connection_validator.rb:100:in
`acquire'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/connection_pool/threaded.rb:91:in
`hold'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/database/connecting.rb:269:in
`synchronize'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/adapters/tinytds.rb:251:in
`literal_string_append'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/sql.rb:82:in
`literal_append'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/sql.rb:1063:in
`block in expression_list_append'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/sql.rb:1061:in
`each'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/sql.rb:1061:in
`expression_list_append'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/sql.rb:281:in
`array_sql_append'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/sql.rb:1227:in
`literal_array_append'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/sql.rb:101:in
`literal_append'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/sql.rb:384:in
`complex_expression_sql_append'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/adapters/shared/mssql.rb:572:in
`complex_expression_sql_append'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/sql.rb:112:in
`to_s_append'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/sql.rb:1271:in
`literal_expression_append'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/sql.rb:89:in
`literal_append'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/sql.rb:1517:in
`select_where_sql'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/sql.rb:248:in
`select_sql'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/adapters/utils/emulate_offset_with_row_number.rb:22:in
`select_sql'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/adapters/shared/mssql.rb:686:in
`select_sql'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/actions.rb:152:in
`each'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/actions.rb:444:in
`map'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/actions.rb:444:in
`map'
/usr/local/bundle/gems/rom-core-5.2.5/lib/rom/relation.rb:223:in `each'
/usr/local/bundle/gems/rom-core-5.2.5/lib/rom/relation.rb:363:in `each'
/usr/local/bundle/gems/rom-core-5.2.5/lib/rom/relation.rb:363:in `to_a'
/usr/local/bundle/gems/rom-core-5.2.5/lib/rom/relation.rb:363:in `to_a'
/app/app/lib/repositories/ai_records_repo.rb:11:in `all_filtered'
...
After that I get the following:
[api] [ERROR] [2021-09-20 14:00:14 +0200] TinyTds::Error: DBPROCESS is dead
or not enabled: SELECT [AI_RECORDS].[ID], [AI_RECORDS].[COLLECTION_NAME],
[AI_RECORDS].[INVOICE_NUMBER], [AI_RECORDS].[REFERENCE_NUMBER],
[AI_RECORDS].[INVOICE_DATE], [AI_RECORDS].[TOTAL_AMOUNT],
[AI_RECORDS].[NET_AMOUNT], [AI_RECORDS].[TOUR_OPERATOR],
[AI_RECORDS].[INVOICE_SITE], [AI_RECORDS].[INVOICE_PATH],
[AI_RECORDS].[INVOICE_NAME], [AI_RECORDS].[STATUS_ID],
[AI_RECORDS].[MESSAGES], [AI_RECORDS].[CREATED], [AI_RECORDS].[UPDATED],
[AI_RECORDS].[DOCUMENT_IDENTIFIER] FROM [AI_RECORDS] WHERE ([STATUS_ID] IN
(N'failed', N'corrected', N'rejected', N'passed', N'created')) ORDER BY
[AI_RECORDS].[ID]
/usr/local/bundle/gems/puma-5.3.2/lib/puma/thread_pool.rb:145:in `block
in spawn_thread'Sequel::DatabaseDisconnectError: TinyTds::Error: DBPROCESS
is dead or not enabled
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/adapters/tinytds.rb:74:in
`execute'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/adapters/tinytds.rb:74:in
`block (2 levels) in execute'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/database/logging.rb:43:in
`log_connection_yield'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/adapters/tinytds.rb:73:in
`block in execute'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/connection_pool/threaded.rb:88:in
`hold'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/database/connecting.rb:269:in
`synchronize'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/adapters/tinytds.rb:47:in
`execute'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/actions.rb:1093:in
`execute'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/adapters/tinytds.rb:215:in
`fetch_rows'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/actions.rb:152:in
`each'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/actions.rb:444:in
`map'
/usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/actions.rb:444:in
`map'
/usr/local/bundle/gems/rom-core-5.2.5/lib/rom/relation.rb:223:in `each'
/usr/local/bundle/gems/rom-core-5.2.5/lib/rom/relation.rb:363:in `each'
/usr/local/bundle/gems/rom-core-5.2.5/lib/rom/relation.rb:363:in `to_a'
/usr/local/bundle/gems/rom-core-5.2.5/lib/rom/relation.rb:363:in `to_a'
/app/app/lib/repositories/ai_records_repo.rb:11:in `all_filtered'
Could you take a look at this, please? Maybe with the help of the logs, you
know what's going on.
Thanks you
Best regards!
Armin
armin schrieb am Donnerstag, 19. August 2021 um 08:21:05 UTC+2:
> Thank you Mr. Evans! I changed the connection_validation_timeout to 60 and
> will check if the problem is solved.
> I'm not sure because the last time the error occurred, the program wasn't
> used for 2 weeks. So the connection was also inactive for 2 weeks, and the
> validation at checkout should have worked, right? But, I get the above
> error.
>
> Best regards and thank you!
> Armin
>
> Jeremy Evans schrieb am Montag, 16. August 2021 um 16:04:34 UTC+2:
>
>> On Mon, Aug 16, 2021 at 1:07 AM armin <[email protected]> wrote:
>>
>>>
>>> Hey,
>>>
>>> I have a problem with a MSSQL-Database-Connection. After some idle, I
>>> get following error:
>>>
>>> /usr/local/bundle/gems/puma-5.3.2/lib/puma/thread_pool.rb:145:in
>>> `block in spawn_thread'Sequel::DatabaseDisconnectError: TinyTds::Error:
>>> DBPROCESS is dead or not enabled
>>>
>>> /usr/local/bundle/gems/sequel-5.45.0/lib/sequel/adapters/tinytds.rb:74:in
>>> `execute'
>>>
>>> /usr/local/bundle/gems/sequel-5.45.0/lib/sequel/adapters/tinytds.rb:74:in
>>> `block (2 levels) in execute'
>>>
>>> /usr/local/bundle/gems/sequel-5.45.0/lib/sequel/database/logging.rb:43:in
>>> `log_connection_yield'
>>>
>>> /usr/local/bundle/gems/sequel-5.45.0/lib/sequel/adapters/tinytds.rb:73:in
>>> `block in execute'
>>>
>>>
>>> /usr/local/bundle/gems/sequel-5.45.0/lib/sequel/connection_pool/threaded.rb:88:in
>>>
>>> `hold'
>>>
>>>
>>> /usr/local/bundle/gems/sequel-5.45.0/lib/sequel/database/connecting.rb:269:in
>>>
>>> `synchronize'
>>>
>>> /usr/local/bundle/gems/sequel-5.45.0/lib/sequel/adapters/tinytds.rb:47:in
>>> `execute'
>>>
>>> /usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/actions.rb:1093:in
>>> `execute'
>>>
>>> /usr/local/bundle/gems/sequel-5.45.0/lib/sequel/adapters/tinytds.rb:215:in
>>> `fetch_rows'
>>>
>>> /usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/actions.rb:152:in
>>> `each'
>>>
>>> /usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/actions.rb:444:in
>>> `map'
>>>
>>> /usr/local/bundle/gems/sequel-5.45.0/lib/sequel/dataset/actions.rb:444:in
>>> `map'
>>> /usr/local/bundle/gems/rom-core-5.2.5/lib/rom/relation.rb:223:in
>>> `each'
>>> /usr/local/bundle/gems/rom-core-5.2.5/lib/rom/relation.rb:363:in
>>> `each'
>>> /usr/local/bundle/gems/rom-core-5.2.5/lib/rom/relation.rb:363:in
>>> `to_a'
>>> /usr/local/bundle/gems/rom-core-5.2.5/lib/rom/relation.rb:363:in
>>> `to_a'
>>> /app/app/lib/repositories/ai_records_repo.rb:14:in `all_filtered'
>>>
>>> The ConnectionValidator-plugin is enabled.
>>>
>>> container = ROM.container(configuration)
>>> container.gateways[:default].connection.extension(:connection_validator)
>>>
>>
>> You may want to set the connection validation timeout. The default is an
>> hour, which may be too long for your case. You can set it to check for
>> validity after than one minute idle using:
>>
>> container.gateways[:default].connection.pool.connection_validation_timeout
>> = 60
>>
>> Thanks,
>> Jeremy
>>
>
--
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/92227a73-9ba1-4bd8-b05a-6750beac3750n%40googlegroups.com.