-
Notifications
You must be signed in to change notification settings - Fork 378
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
Time-out on HTTP request causes server to exit #702
Comments
Spent some time looking at it. I think the issue occurs because exceptions raised by Rough sequence:
This causes the app to exit with the error attached to the original report. I was able to fix this by simply wrapping the entirety of This returns a 400 response with the text "Timed out" as the message, which is great. HTH. Happy to send a PR for this fix. |
[READY] Remove timeout from Tern completer Fixes #278 As described on the issue, the Tern server exits when a timeout is hit. The Tern server's timeout is actually a guesstimate anyway, and ignores I/O time. We're better off just removing it and relying on ycmd client requests timing out. It doesn't appear that the other completers add any other time-out. We can re-asses should ternjs/tern#702 be fixed. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/281) <!-- Reviewable:end -->
@marijnh Thanks for this patch. However, I've just tried this out and i'm still getting the same error, with a slightly different call stack. Happens both with 0.17.0 and master. Can this be re-opened, or would you like me to raise a new issue? stderr:
stdout:
Current commit:
|
My bad. I handled only one source of timeout exceptions, but there's another. I think patch a6fe812 improves the situation. |
Thanks! I will check it out this evening. |
Hi there,
According to the documentation, the
timeout
parameter should return an error when it is hit:...
I was expecting this would mean sending a 500 error response, or some such, which is nice and easy to handle in my REST client.
However, the behaviour I am seeing (when editing Tern's own
bin/tern
in this test case) is that the server exits with the following exception trace in its stderr log file:I'm using a fairly conservative 500ms time-out.
Is this the expected behaviour? If so, it's a little unfortunate, as I probably don't want to make it any more conservative, and handling the server going up and down all the while will lead to a bad user experience.
What do you think? I can look at a PR to catch the exception(s?) if you think this is something that would be accepted.
Many thanks,
Ben
PS Full log of request leading to above exception http://pastebin.com/vZ0FqP1K (the source is the current HEAD of tern on github).
The text was updated successfully, but these errors were encountered: