kevin
11/15/2021, 10:38 PMFailed to set task state with error: ClientError([{'path': ['set_task_run_states'], 'message': 'State payload is too large.', 'extensions': {'code': 'INTERNAL_SERVER_ERROR'}}])
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/prefect/engine/cloud/task_runner.py", line 91, in call_runner_target_handlers
state = self.client.set_task_run_state(
File "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 1518, in set_task_run_state
result = self.graphql(
File "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 319, in graphql
raise ClientError(result["errors"])
prefect.utilities.exceptions.ClientError: [{'path': ['set_task_run_states'], 'message': 'State payload is too large.', 'extensions': {'code': 'INTERNAL_SERVER_ERROR'}}]
It appears to me that I'm managing a JSON payload that Prefect considers "too large" however from what I see, the payload I'm sending is only on the scale of ~100KB which to me intuitively isn't that large. Is there some limitation in Prefect that I'm accidentally breaching or is there something else I should be investigating in my code that could be causing thiskevin
11/15/2021, 10:51 PMZanie
kevin
11/15/2021, 11:42 PMZanie
_send_request
kevin
11/15/2021, 11:42 PMZanie
Zanie
Zanie
PrefectResult
to store your task results in the database?kevin
11/16/2021, 12:01 AMZanie
kevin
11/16/2021, 12:04 AMkevin
11/16/2021, 12:12 AMkevin
11/16/2021, 12:12 AMZanie
kevin
11/16/2021, 12:13 AMZanie
kevin
11/16/2021, 12:15 AMZanie
kevin
11/16/2021, 12:24 AMZanie
state_size = sys.getsizeof(json.dumps(serialized_state))
if state_size > 1000000: # 1 mb
breakpoint()
kevin
11/16/2021, 12:25 AMZanie
kevin
11/16/2021, 12:25 AMZanie
prefect run --execute
so you can use a debuggerkevin
11/16/2021, 12:26 AMZanie
kevin
11/16/2021, 1:04 AMkevin
11/16/2021, 1:04 AM119876
kevin
11/16/2021, 1:04 AMkevin
11/16/2021, 5:44 AMZanie
kevin
11/16/2021, 4:24 PM