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

BrokenPipeError: [Errno 32] Broken pipe #78

Open
toxicologist opened this issue Oct 6, 2017 · 1 comment
Open

BrokenPipeError: [Errno 32] Broken pipe #78

toxicologist opened this issue Oct 6, 2017 · 1 comment

Comments

@toxicologist
Copy link

Trying to create a raw transaction on the testnet gives the following error:

  File "<pyshell#11>", line 1, in <module>
    con.createrawtransaction([{"txid":"a8fd2dacb674cec804e1cd861c9310d999d6d149fd17d5e44034ed1207860f60","vout":0}], {"myJXY5WznWSLqSoghhieCXfykkZnCz9P1U":1.79})
  File "/usr/local/lib/python3.5/dist-packages/bitcoinrpc/authproxy.py", line 136, in __call__
    'Content-type': 'application/json'})
  File "/usr/lib/python3.5/http/client.py", line 1106, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.5/http/client.py", line 936, in _send_output
    self.send(message_body)
  File "/usr/lib/python3.5/http/client.py", line 908, in send
    self.sock.sendall(data)
BrokenPipeError: [Errno 32] Broken pipe
>>> 
@dlypka59
Copy link

I believe the Broken pipe happens if you are typing commands from a python console and you wait too long between requests. I had this error but resolved it by not lingering between requests and also by adding the timeout arg as suggested in the Readme.rst:
Socket timeouts under heavy load
Pass the timeout argument to prevent "socket timed out" exceptions:
rpc_connection = AuthServiceProxy(
"http://%s:%s@%s:%s"%(rpc_user, rpc_password, rpc_host, rpc_port), timeout=120)

If the Broken pipe error still occurs then perhaps some sort of Keep Alive (do nothing) request should be sent at rapid intervals to keep the Pipe from closing. Or else trap the Broken pipe exception and make a new connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants