samedi 2 juillet 2016

"ConnectionError: ('Connection aborted.', error(104, 'Connection reset by peer'))" error when Python hits a Java Jetty server

I am encountering a bugging issue when my Python script hits via HTTP POST on my Java Jetty server (using Jersey framework).

Basically, this seems to happen when the HTTP POST happens from the Python side, and on the server side, it might take quite some time to execute some MySQL calls.

After some time, I will see the Python side throw this error :

ConnectionError: ('Connection aborted.', error(104, 'Connection reset by peer'))

However, when Python performs the post with

requests.post(url, headers={"Content-Type": "application/json"}, json=data)

I assume that the timeout should have a default value of None, which means it should never timeout.

So I suspect that the timeout is happening on the Jetty server side? I do not see any errors in the jetty Java console. Is there any way to EXPLICITLY disable timeouts on the Jetty server side?

Thanks! IS

Aucun commentaire:

Enregistrer un commentaire