[Error] Request Entity Too Large
I got an error below in testnet, 1.2.3.
ERROR:root:Unexpected error in collect_pool_rewards_loop: 413, message='Request Entity Too Large', url=URL('https://localhost:8555/push_tx') Traceback (most recent call last):
File "/home/chia/testnet/pool-reference/pool/pool.py", line 332, in collect_pool_rewards_loop
push_tx_response: Dict = await self.node_rpc_client.push_tx(spend_bundle)
File "/home/chia/testnet/pool-reference/venv/lib/python3.8/site-packages/chia/rpc/full_node_rpc_client.py", line 162, in push_tx
return await self.fetch("push_tx", {"spend_bundle": spend_bundle.to_json_dict()})
File "/home/chia/testnet/pool-reference/venv/lib/python3.8/site-packages/chia/rpc/rpc_client.py", line 42, in fetch
response.raise_for_status()
File "/home/chia/testnet/pool-reference/venv/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1000, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 413, message='Request Entity Too Large', url=URL('https://localhost:8555/push_tx')
I think this is because my pool server has offline long time for about 4 days.
Does the HTTP server need to fix this problem? I think it is related to the upload size.
I see it in create_absorb_transaction in singleton.py.
# TODO(pool): handle the case where the cost exceeds the size of the block
Looking into this
Have you guys figured out the root cause or a fix?
How many payments are you making at once?
How many payments are you making at once?
It's on the testnet7. Farming is about... 12TB. problem is when the pool server closed for a few days, and started. After started, it can not get any rewards from mainnet.
@mariano54
There are too many records get_coin_records_by_puzzle_hashes. I think that is the root cause.
in pool.py
coin_records: List[CoinRecord] = await self.node_rpc_client.get_coin_records_by_puzzle_hashes(
scan_phs,
include_spent_coins=False,
start_height=self.scan_start_height,
)
maybe chunking coin_records list is a workaround, but I am not sure about other async loops relations.
def list_chunk(lst, n):
return [lst[i:i+n] for i in range(0, len(lst), n)]
coin_records_chunked = list_chunk(coin_records, 100)
coin_records_chunked_count = len(coin_records_chunked)
for idx, a_coin_records in enumerate(coin_records_chunked):
Yes, get_coin_records_by_puzzle_hashes takes in start_height and end_height, you can use that.
Yes,
get_coin_records_by_puzzle_hashestakes in start_height and end_height, you can use that.
I hope you guys can use this approach.
Was this issue solved?
Or is it now a feature request?