Diagnosing Kodi specific network issue

Hope you can help with a Kodi specific network issue, however, it only appears days after booting up.

In the latest case, the device last booted 5th May and network issue appeared on 15th May.

When the issue appears, I can connect to the box via SSH, can ping, traceroute and curl to local servers and remote servers at the command line however at the Kodi app level Kodi seems to times out when trying to connect to remote servers.

The video library is connected to a https drive. When scanning for new files it returns a timeout error after 30 secs.

2024-05-24 19:17:00.340 T:11310   debug <general>: Thread JobWorker start, auto delete: true
2024-05-24 19:17:00.396 T:5382    debug <general>: ------ Window Init (DialogExtendedProgressBar.xml) ------
2024-05-24 19:17:00.415 T:11310    info <general>: VideoInfoScanner: Starting scan ..
2024-05-24 19:17:00.416 T:11310   debug <general>: easy_acquire - Created session to https://<redacted>.execute-api.eu-west-1.amazonaws.com
2024-05-24 19:17:00.416 T:11310   debug <general>: Curl::Debug - TEXT: Added <redacted>.execute-api.eu-west-1.amazonaws.com:443:34.255.157.115 to DNS cache
2024-05-24 19:17:00.417 T:11310   debug <general>: Curl::Debug - TEXT: Hostname <redacted>.execute-api.eu-west-1.amazonaws.com was found in DNS cache
2024-05-24 19:17:00.417 T:11310   debug <general>: Curl::Debug - TEXT:   Trying 34.255.157.115:443...
2024-05-24 19:17:00.491 T:11311   debug <general>: Thread JobWorker start, auto delete: true
2024-05-24 19:17:22.090 T:4714    debug <CSettingsManager>: requested setting (_updates) was not found.
2024-05-24 19:17:30.419 T:11310   debug <general>: Curl::Debug - TEXT: Connection timed out after 30002 milliseconds
2024-05-24 19:17:30.420 T:11310   debug <general>: Curl::Debug - TEXT: Closing connection 0
2024-05-24 19:17:30.420 T:11310   error <general>: CCurlFile::Stat - <https://<redacted>.execute-api.eu-west-1.amazonaws.com/<redacted>/> Failed: Timeout was reached(28)
2024-05-24 19:17:30.420 T:11310 warning <general>: Process directory 'https://<redacted>.execute-api.eu-west-1.amazonaws.com/<redacted>/' does not exist - skipping scan.
2024-05-24 19:17:30.448 T:11310    info <general>: VideoInfoScanner: Finished scan. Scanning for video info took 30039 ms

Testing the same URL on the command line works fine

If i try to play an episode, I noted when debug mode is on, the text in top left freezes for a while then it will eventually begin to play around 40 seconds later.

If i reboot, it will be all fine for a number of days before appearing again. I’ve rebooted tonight but when it happens again is there any recommendations to help diagnose the issue?

No point redacting hostname but keeping IP. I could find the hostname via PTR lookup…

Shouldn’t make a difference but try using the IP instead of hostname.

When it happens is it only a single file that refuses to play or all files from the same source? I think Kodi has something where when it times out on a file it doesn’t actually try to connect on repeated attempts to play the same file path but If you play anything else and try again it will actually make another attempt at accessing the original file.

Also there is a timeout setting in settings>system>power savings that might be worth a try.