Skip to content
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

Error starting timeout #484

Closed
Mte90 opened this issue Sep 14, 2020 · 12 comments · Fixed by #488
Closed

Error starting timeout #484

Mte90 opened this issue Sep 14, 2020 · 12 comments · Fixed by #488
Labels

Comments

@Mte90
Copy link

Mte90 commented Sep 14, 2020

Screenshot_20200914_171549

I am getting this error maybe is connected to #403?

The log when this error is happening: https://pastebin.com/qwGYmnFu

Anyway this error block the opening of the various buffers with the informations.

@dave2309
Copy link
Contributor

After upgrading vdebug , I have the same error showing up during debug... when an ajax takes some times (difficult to measure that)

@BlackIkeEagle
Copy link
Member

Could you create simple steps to reproduce? I have tried to reproduce but not yet encountered this socket.timeout issue

@BlackIkeEagle
Copy link
Member

@Mte90 I don't think the timeout is related to the empty stacktrace

@Mte90
Copy link
Author

Mte90 commented Sep 28, 2020

when I tested I changed the code to get more seconds, as I can remember the error was still there.

@dave2309
Copy link
Contributor

It is difficult to make steps to reproduce. But for me I can reproduce each time I have a process on backend that takes more than 30s to process. eg. series of ajax calls (short ones) are perfectly fine. Then one request needs to wait for a backend task to finish like an upload to some server, big file, upload times is more than 30s. then the error message appear on vim.
I have tested two versions of vim: (on ubuntu)
version: 2:8.1.2269-1ubuntu5
and version: 2:8.2.1767-0york0~20.04
same result

@dave2309
Copy link
Contributor

dave2309 commented Sep 28, 2020

Something I did which endup losing the connection.
Put a breakpoint at a first line method.
next is sleep(30);
then another breakpoint next line.

When running. Vim breaks at the first breakpoint. Then when pressing F5 then display a connection closed after around 5s.

actually sleep(4); passes, sleep(5); would break
Connection to the debugger has been closed

@dave2309
Copy link
Contributor

So Error starting Vdebug: <class 'socket.timeout'> appears when performing an xhr call.
Otherwise the message is Connection to the debugger has been closed.
But both occur if the "task" takes more than 4s. until 4s everything is fine. 5s then errors shows up.

@BlackIkeEagle
Copy link
Member

@dave2309 thanks, I'll look into it further

@dave2309
Copy link
Contributor

dave2309 commented Sep 28, 2020

I may have found something.
.vim/bundle/vdebug/python3/vdebug/connection.py
line 195
client.settimeout(5)

if change to
client.settimeout(5000)

error is gone. can you confirm @Mte90 ?

If it is the "culprit" maybe a configuration value would be interesting to define here connection.timeout or so... @BlackIkeEagle ?

@BlackIkeEagle
Copy link
Member

@dave2309 the client should not set the timeout there, I overlooked that

BlackIkeEagle added a commit that referenced this issue Sep 29, 2020
move the client.settimeout back to the socket

fixes #484

Signed-off-by: BlackEagle <[email protected]>
@BlackIkeEagle
Copy link
Member

Thanks for the additional input, this helped finding the issue

@dave2309
Copy link
Contributor

nm
I use vdebug quite intensively. I would have love to PR but I don't have enough knowledge of vdebug internal to propose yet.
Glad I could help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants