Skip to content

Conversation

p-schlickmann
Copy link
Contributor

Just another quick one to clean up the CI logs:

Screenshot 2025-07-22 at 19 13 01

retries is deprecated in Rails 8.0 and will be fully removed in 8.1, so I replaced retries: 100 with timeout: 5000.

Why 5000? SQLite3Configuration#configure_connection sleeps count * 0.001 seconds on each retry, up to 100:
Σ(1..100) * 0.001 = 0.001 * 5050 ≈ 5.05s → ~5000ms. See:

def configure_connection
super
if @config[:retries]
retries = self.class.type_cast_config_to_integer(@config[:retries])
raw_connection.busy_handler do |count|
(count <= retries).tap { |result| sleep count * 0.001 if result }
end
end
end

@p-schlickmann p-schlickmann changed the title Replace deprecated retries option for timeout in rails 8 and above Replace deprecated retries option with timeout in rails 8 and above Jul 22, 2025
Copy link
Member

@rosa rosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thank you 🙏

@rosa rosa merged commit 50b5f77 into rails:main Jul 23, 2025
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants