1

Hi I am a newbie to springboot. I am using caffeine cache. Recently, I am getting a lot of 500 errors when the system calls an endpoint. The errors are like below:

2021-09-17 00:37:12.127 WARN 1 --- [ Thread-33] c.g.b.caffeine.cache.LocalAsyncCache : Exception thrown during asynchronous load java.util.concurrent.CompletionException: java.net.http.HttpTimeoutException: request timed out

Can this be due to failing to read the cache successfully due to the data has expired or due to the data being too big?

  • As often users forget to add an exception handler to futures, Caffeine logs if an error occurs when computing the cached value. You can disable that in your logging library. This indicates that the http client had a timeout when fetching the remote resource in your cache loader. – Ben Manes Sep 17 '21 at 02:53
  • Thanks @BenManes, I assume what you are saying is that the problem could be due to the remote resource not sending a response when the cache loader fetches from the resource? – Derek Lim Sep 18 '21 at 08:48
  • Yes, the error type `HttpTimeoutException ` and message `request timed out` indicates that the http client failed to receive a response, canceled, and threw the exception to notify you that something seemed to be wrong. – Ben Manes Sep 18 '21 at 17:07
  • Thank you for the concise clarifications. Appreciate you help! – dereklim7777777 Sep 19 '21 at 04:05

0 Answers0