mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-09-24 07:25:03 -05:00
Increase API timeout and improve logging
This commit is contained in:
committed by
Mariano Sorgente
parent
3972cc7f00
commit
95d42da37b
@@ -511,7 +511,7 @@ class ChiaServer:
|
||||
connection.log.error(f"Exception: {e}, {connection.get_peer_info()}. {tb}")
|
||||
raise e
|
||||
|
||||
response: Optional[Message] = await asyncio.wait_for(wrapped_coroutine(), timeout=300)
|
||||
response: Optional[Message] = await asyncio.wait_for(wrapped_coroutine(), timeout=600)
|
||||
connection.log.debug(
|
||||
f"Time taken to process {message_type} from {connection.peer_node_id} is "
|
||||
f"{time.time() - start_time} seconds"
|
||||
@@ -523,7 +523,9 @@ class ChiaServer:
|
||||
except Exception as e:
|
||||
if self.connection_close_task is None:
|
||||
tb = traceback.format_exc()
|
||||
connection.log.error(f"Exception: {e}, closing connection {connection.get_peer_info()}. {tb}")
|
||||
connection.log.error(
|
||||
f"Exception: {e} {type(e)}, closing connection {connection.get_peer_info()}. {tb}"
|
||||
)
|
||||
else:
|
||||
connection.log.debug(f"Exception: {e} while closing connection")
|
||||
# TODO: actually throw one of the errors from errors.py and pass this to close
|
||||
|
||||
@@ -203,9 +203,11 @@ class WSChiaConnection:
|
||||
await self._send_message(msg)
|
||||
except asyncio.CancelledError:
|
||||
pass
|
||||
except ConnectionResetError as e:
|
||||
self.log.warning(f"{e} {self.peer_host}")
|
||||
except Exception as e:
|
||||
error_stack = traceback.format_exc()
|
||||
self.log.error(f"Exception: {e}")
|
||||
self.log.error(f"Exception: {e} with {self.peer_host}")
|
||||
self.log.error(f"Exception Stack: {error_stack}")
|
||||
|
||||
async def inbound_handler(self):
|
||||
|
||||
Reference in New Issue
Block a user