question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Watcher stuck forever in a case of network disconnect

See original GitHub issue

What happened (please include outputs or screenshots): If the network to Kubernetes API disconnects, watcher just gets stuck forever with no exception.

What you expected to happen: Watcher should raise an exception in a case of any network issues.

How to reproduce it (as minimally and precisely as possible):

  1. Run watcher for any object list with some timeout (60 seconds, for example)
  2. Turn off network adapter on your laptop
  3. Wait for 60 seconds (timeout) and watcher still does not return the control: thread just stuck

Anything else we need to know?:

Environment:

  • Kubernetes version (kubectl version): 1.17.0
  • OS (e.g., MacOS 10.13.6): Windows 10
  • Python version (python --version): 3.7
  • Python client version (pip list | grep kubernetes): 11.0.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ellieaylacommented, May 9, 2020

kwargs['timeout_seconds'] = 60 is a polite request to the server, asking it to cleanly close the connection after 60 seconds. If you have a network outage, this does nothing. You can set this number much higher, maybe to 3600 seconds (1h).

kwargs['_request_timeout'] = 60 is a client-side timeout, configuring your local socket. If you have a network outage dropping all packets with no RST/FIN, this is how long your client waits before realizing & dropping the connection. You can keep this number low, maybe 60 seconds.

0reactions
NikPaushkincommented, Mar 24, 2022

@xuejiezhang Hi, This is the expected behavior. I’ve made own implementation of the reconnect, nothing else to do here until #868 closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Network connection stuck on "Identifying..." in Windows 10.
In this video I will show you how to Fix: Network connection stuck on "Identifying..." in Windows 10.➤ Best TOOL to grow on...
Read more >
Troubleshoot Azure Private Endpoint connectivity problems
Use VM Connection troubleshoot from Azure Network Watcher. a. Select the client VM.
Read more >
wireless access point stuck on 'disconnected' status
I'm testing a Mist Access Point (AP41) on my home network and it wont receive internet for some reason, I have it plugged...
Read more >
Stuck in H+ Internet
OnePlus 3/3T Stuck in H+ Internet So i upgraded my OP3 to nougat and n. So i upgraded my OP3 to nougat and...
Read more >
Can't Watch Because Twitch Stream Keeps Buffering? Fix It!
Trying to watch a Twitch stream and it keeps buffering? ... Sometimes you can even get disconnected from the internet and have to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found