Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDiffbot client not closing TCP connections until client exits #58
Comments
|
I wrote a wrapper for the Diffbot client which implemented a singleton and this has resolved the issue for me.
So I would propose that rather than calling While the root cause - dangling TCP connections - is still there, it's only a single one, from the single Diffbot object, being re-used extensively, even when updating thousands of searches. I would propose a similar approach is taken within your library. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When making a call to create or update a job, the client is not closing TCP connections after the request to the api endpoint.
Running the following code demonstrates the issue:
Now the socket remains open until the process quits:
While not too bad for a single socket, if you create a lot of diffbot objects using
new Diffbot(), you can quickly run out of open files on the system as the sockets aren't closed even when the object falls out of scope.