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

Exposed the timeout of SPARQLWrapper #531

Merged
merged 3 commits into from
Nov 28, 2015

Conversation

mwatts15
Copy link
Contributor

I want to set a timeout on the connection in SPARQLStore. I can cause sendall() in the underlying socket object to timeout through SPARQLWrapper, but SPARQLUpdateStore resets the timeout to 0. This change keeps the timeout in-between updates.

Background:
I have been doing some experiments with sending SPARQL updates of increasing size and hit a limit where the underlying socket in the SPARQLUpdateStore is blocking in sendall(). I check with netstat and see the state of the connection is "CLOSE_WAIT", so the remote endpoint closed the connection. It seems like sendall() should return here; not sure.

@joernhees joernhees added enhancement New feature or request SPARQL store Related to a store. labels Oct 19, 2015
@joernhees joernhees added this to the rdflib 4.2.2 milestone Oct 19, 2015
@joernhees
Copy link
Member

i like the idea of improving the configurability of the SPARQLUpdateStore connection, but probably not restricted to the timeout parameter only.

also as you can see, your change breaks current tests if no timeout is set.

@mwatts15
Copy link
Contributor Author

i like the idea of improving the configurability of the SPARQLUpdateStore connection, but probably not restricted to the timeout parameter only.

What do you have in mind?

@wikier
Copy link
Member

wikier commented Nov 5, 2015

👍

@joernhees
Copy link
Member

eh, well can't hurt to have this at least until the full config can be restored for each request...

joernhees added a commit that referenced this pull request Nov 28, 2015
Exposed the timeout of SPARQLWrapper
@joernhees joernhees merged commit 7914af8 into RDFLib:master Nov 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SPARQL store Related to a store.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants