abingham / emacs-ycmd

Emacs client for ycmd, the code completion system.
MIT License
384 stars 46 forks source link

Why the number of process such as marked in the pic will keep increasing and finally cause an error. #440

Closed moyotar closed 7 years ago

moyotar commented 7 years ago

image

abingham commented 7 years ago

Can you provide any more details? For example, do you know if the connections are from emacs to ycmd or from ycmd to one of its sub-servers?

moyotar commented 7 years ago

How to know this? Yesterday, when meeting this error, I tried to know more about these connections but found nothing more.

moyotar commented 7 years ago

image Like this. The number of such connections will keep increasing.

abingham commented 7 years ago

What's your value for request-backend? One possibility is that request.el is using url.el (e.g. because you don't have curl installed), and whatever network connections it opens are not getting closed. This might be because of something emacs-ycmd is doing, but it seems unlikely since this is the first we're hearing about it.

moyotar commented 7 years ago

image Company: An error occurred in auto-begin Company: backend (company-ycmd company-files company-keywords company-capf company-yasnippet) error "make client process failed: too many open files, :name, 127.0.0.1, :buffer, #, :host, 127.0.0.1, :service, 51803, :nowait, nil" with args (candidates ) Error while checking syntax automatically: (file-error "Spawning child process" "resource temporarily unavailable") image

abingham commented 7 years ago

Yeah, I think this might be a bug in url.el. One way to verify this would be to use curl (the default backend for request.el) and see if this problem goes away.

You might also ask on stackoverflow if there are known problems with url.el, windows, and orphaned connections.

ptrv commented 7 years ago

I am using url-retrieve as backend on Mac and Linux and I don't have this problem.

@moyotar Which Emacs version do you use?

As @abingham pointed out this could also be a bug in url.el

moyotar commented 7 years ago

Sorry for taking a long time to reply. @ptrv My Emacs version is 24.5.1 on windows 10. @abingham Ok, I will change the request backend to curl and report at once if this problem still exists.

moyotar commented 7 years ago

Similarly, another error occurs.

image

request curl run request curl -- curl --silent --include --location --compressed --cookie d:\Program Files\emacs-config.emacs.d\request\curl-cookie-jar --cookie-jar d:\Program Files\emacs-config.emacs.d\request\curl-cookie-jar --write-out \n(:num-redirects %{num_redirects} :url-effective %{url_effective}) --data-binary @- --request POST --header Content-Type: application/json --header X-Ycm-Hmac: rj5nWp8jQ+bLRmqCDOj5WW5KfCOnXKneHtGSLndfmvw= http://127.0.0.1:62709/completions

image

moyotar commented 7 years ago

@abingham @ptrv No matter which backend I choose, It will cause too much process finally.