SyntheticTimeoutException: what is this, how to suppress or ignore them? #307
-
|
Hi. I have no idea how to handle SyntheticTimeoutException, is there any way to ignore or suppress them? Also, whats the root cause of said exception, and what happens if I ignore or suppress them? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Hi @digital88 , did you see them in the logs or are you getting them thrown up to your own code? Anyway Have you enabled the feature maybe? If you enabled soft timeout instead, you will not receive them in your code and just see some warnings in the logs. Soft timeout means "during a refresh, if the factory takes more than X time, I prefer to temporarily reuse a stale (expired) value instead of waiting too much". Warning levels are also configurable (via Hope this helps, let me know. |
Beta Was this translation helpful? Give feedback.
-
Sentry catches them and reports, so I assume they bubble up to my code. They rarely do tho.
Yes, as suggested in StepByStep guide, I did enable them, and also enabled soft timeouts. The guide actually mentions So I guess I remove hard timeout from config entirely, I'm ok with getting stale (expired) cache value. Thank you for answering, you really helped me to better understand soft/hard timeouts. |
Beta Was this translation helpful? Give feedback.
Hi @digital88 , did you see them in the logs or are you getting them thrown up to your own code?
Anyway
SyntheticTimeoutExceptions are thrown when you enable hard timeouts and those timeouts actually happen.Have you enabled the feature maybe?
If so, basically you are saying "during a refresh, if the factory takes more than X time, I prefer to receive an exception instead of waiting too much" because you prefer to be fast and handle the error yourself.
If you enabled soft timeout instead, you will not receive them in your code and just see some warnings in the logs. Soft timeout means "during a refresh, if the factory takes more than X time, I prefer to temporarily reuse a stale (expired)…