Exposed the timeout of SPARQLWrapper by mwatts15 · Pull Request #531 · RDFLib/rdflib (original) (raw)
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.