-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debugging django app in kubernetes with debugpy attach times out with requests #626
Comments
I tried also
|
I'm not exactly sure how to help here... the error seems to be in the infrastructure used and not really in the debugger. I think that the issue is that the connection is flaky. Can you do some ssh tunneling instead to see if it'd be more consistent? |
This is all done locally, i.e the cluster is local, not sure if an ssh tunnel is necessary (and possible?) here. I might try to setup a repository that can easily replicate this and run some sample and see where it goes. |
In the pydevd side, there are some tweaks to the socket to keep the connection alive: So, this should work from If it there's nothing similar, this could be the root reason for this issue... |
I'm pretty sure we had |
@jankovicgd can you can try to update your local copy with the patch from: https://github.com/microsoft/debugpy/pull/639/files to see if it works for you with those changes? |
Set keepalive for all debugpy sockets. Fixes #626
Sorry for the long radio silence, basically stopped working on this until I needed to again (which is now), but @fabioz was right. It is an infrastructure problem, and now that I'm older and wiser I was able to quickly figure it out. The kubernetes pod was hitting a liveness probe check that ultimately made it restart while a debug session is ongoing, so it wasn't even an issue in |
Hey all, not sure if this is the best place for this issue, please let me know.
Environment data
python.languageServer
setting: PylanceExpected behaviour
Debugging as usual without interruption.
Actual behaviour
The debugger "times out" and can no longer debug and step through the code when sending a web request to a pod running in minikube.
Steps to reproduce:
launch.json
manage.py
Tried sending the request via the ingress, and also forwarded the port of the app to localhost and sent a request circumventing the ingress but same results appeared. This happens only when trying to debug requests. Using (django) cli and running something like
works without timeouts and I can debug without issues.
Logs
Wasn't really getting anything, the logs below seem to be unrelated i.e they didn't appear consistently. Also I am not sure how I can provide more info.
Developer console
Extension host logs
Nginx (ingress) sends a 502 Bad Gateway. Tried here also setting various timeouts but nothing helped.
Let me know if you need any more info, might be of a more difficult setup to test, but it is a bit annoying when being limited in debugging.
The text was updated successfully, but these errors were encountered: