-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sporadically nil connection
in SolidCache::Entry calls
#235
Comments
I'm facing this issue as well. Any updates on that? |
We are seeing this as well on production. Our product is pre-release and lightly used, no load or concurrency. Maybe a stale connection/timeout? |
When you see the problem has it occurred continuously from the initial boot of the process? If the process is initially ok, and it starts later does the process recover? |
Definitely didn't happen at boot, occurred later. Not sure about recovery, we didn't dig that deep. I'll update if I find out more. |
Same here... it occurs during the application usage and not during the boot |
I wonder if there's an earlier error that is swallowed by the failsafe handling? If you set the Store logger, then we might get something useful from it (I need to set this up by default to use the Rails logger). Add something like this in an initializer and maybe we'll find something useful:
|
Enabled logging as suggested above, and now I see this in the logs immediately before the exception:
This was after the service had been running for quite awhile. It was under very light load at the time. |
Ah ok! So looks like you are running out of connections - either your connection pool is too small or you are leaking connections. Things to check:
I'll remove ActiveRecord::ConnectionTimeoutError from the list of transient errors as it causes errors anyway and the true issue is being masked. And I'll connect the logger to the Rails logger by default as well. |
It hides the error and you end up with a different error anyway as the connection is nil. Fixes: #235
I've noticing couple likely connected issue, not regular and with not yet defined stable preconditions.
Also, it's happening inside the code that I run in ActiveJobs (that is managed by SolidQueue 1.0)
sometimes gives an error
another call
sometimes gives
seems like the same root cause -
connection
becamenil
under some conditions (dot not know how to refine these conditions yet)config/cache.yml
cache - uses separate database
was using using
database: cache
initially, tries also withconnects_to
- the same behaviorEnv
Ruby 3.3.0
Rails: 7.2.1.1
SolidCache: 1.0.6
MariaDB with master-master replication in Galera Cluster ()
Stack traces:
The text was updated successfully, but these errors were encountered: