Improve resilience against connection issues when accessing redis cache #36872
malmor
started this conversation in
Suggest an Idea
Replies: 1 comment
-
|
I think it would be fine to log an ERROR and then keep going, with attempts to reconnect. Because it could happen hundreds or thousands of times, it should be logger.once.error() so that it's deduplicated. PR welcome if you'd like to figure out where in the code this can be done. It looks like it's perhaps an uncaught exception, because the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Tell us more.
Hey everyone,
we sometimes have connection issues to our redis cache, which Renovate does not seem to handle very good.
Setup
We are running Renovate hourly against ~2.000 repositories, hosted in a self-managed GitLab instance.
To improve the performance of Renovate and reduce the load on external systems, we have enabled all the difference caching settings, e.g.
repositoryCache,cachePrivatePackagesandpresetCachePersistence. In order to share the cache between multiple renovate jobs, we are running a small redis instance in our infrastructure (single container runningredis:8.0.2).Issue
A few times every day there seems to be some kind of connection error between Renovate and our redis cache:
I assume that is some kind of issue in our infrastructure or network setup, nothing caused by Renovate (we haven't figured out to cause yet, if you have any ideas we would like to hear them 😉).
I am opening this discussion because Renovate does not seem to handle this kind of issue very resilient. It just exits with
Exit code 1, without any additional logs or hints regarding what went wrong. Here are the logs for a failure (LOG_LEVELis set toinfo,LOG_FILE_LEVELtotrace):Job log:
Log file:
Proposed / Expected behaviour
All the data stored in the redis cache should just be a cache - if nothing is there or it can't be read, it should be ignored and fetched from the actual origin (e.g. GitLab or GitHub in this scenario). The error could be reported at the end of the run (similar to host errors when looking up packages), but should not just exit in the middle of processing a repository.
What do you think about this? Should there be a more graceful handling for connection issues to a redis cache?
Kind regards,
Malte
Beta Was this translation helpful? Give feedback.
All reactions