https://prefect.io logo
Title
j

Jarvis Stubblefield

02/23/2023, 1:15 AM
Okay… so I’ve been running flows successfully for about 2 months or so … last night I decided to try to create a new one … have run into some issues, etc. Fixed all of that… now I received on what I believed to be my final run of this flow an error on the Prefect Cloud side of things… I don’t know what it means so I’m posting it here for some insight. Do I just retry my flow run or have I hit some limit?
prefect.exceptions.PrefectHTTPStatusError: Server error '500 Internal Server Error' for url '<https://api.prefect.cloud/api/accounts/5626ffe9-0140-4e88-babc-4a4fc614bb99/workspaces/ee8a533d-2754-420e-87f2-2d6b084984af/flow_runs/>'
Response: {'exception_message': 'Internal Server Error'}
For more information check: <https://httpstatuses.com/500>
Here’s the full error traceback…
Encountered exception during execution:
Traceback (most recent call last):
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/prefect/engine.py", line 651, in orchestrate_flow_run
    result = await run_sync(flow_call)
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 154, in run_sync_in_interruptible_worker_thread
    async with anyio.create_task_group() as tg:
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 662, in __aexit__
    raise exceptions[0]
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 135, in capture_worker_thread_and_result
    result = __fn(*args, **kwargs)
  File "/home/ec2-user/tenzinga/ppower/base/flows/log_entry.py", line 225, in logs_for_date_range
    logs_report = get_logs_for_date_filter(leaders, q_range_filter)
  File "/home/ec2-user/tenzinga/ppower/base/flows/log_entry.py", line 243, in get_logs_for_date_filter
    report = get_log_report(HREUserModel.from_orm(leader), LogEntryModel.from_orm(log))
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/prefect/flows.py", line 456, in __call__
    return enter_flow_run_engine_from_flow_call(
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/prefect/engine.py", line 174, in enter_flow_run_engine_from_flow_call
    return run_async_from_worker_thread(begin_run)
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 177, in run_async_from_worker_thread
    return anyio.from_thread.run(call)
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/anyio/from_thread.py", line 49, in run
    return asynclib.run_async_from_thread(func, *args)
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 970, in run_async_from_thread
    return f.result()
  File "/home/ec2-user/.pyenv/versions/3.10.8/lib/python3.10/concurrent/futures/_base.py", line 458, in result
    return self.__get_result()
  File "/home/ec2-user/.pyenv/versions/3.10.8/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/prefect/client/utilities.py", line 47, in with_injected_client
    return await fn(*args, **kwargs)
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/prefect/engine.py", line 477, in create_and_begin_subflow_run
    flow_run = await client.create_flow_run(
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/prefect/client/orchestration.py", line 542, in create_flow_run
    response = await <http://self._client.post|self._client.post>("/flow_runs/", json=flow_run_create_json)
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/httpx/_client.py", line 1848, in post
    return await self.request(
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/httpx/_client.py", line 1533, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/prefect/client/base.py", line 255, in send
    response.raise_for_status()
  File "/home/ec2-user/.local/share/virtualenvs/ppower-spzYstDT/lib/python3.10/site-packages/prefect/client/base.py", line 130, in raise_for_status
    raise PrefectHTTPStatusError.from_httpx_error(exc) from exc.__cause__
prefect.exceptions.PrefectHTTPStatusError: Server error '500 Internal Server Error' for url '<https://api.prefect.cloud/api/accounts/5626ffe9-0140-4e88-babc-4a4fc614bb99/workspaces/ee8a533d-2754-420e-87f2-2d6b084984af/flow_runs/>'
Response: {'exception_message': 'Internal Server Error'}
For more information check: <https://httpstatuses.com/500>
I have the flow running again… we’ll see.
n

Nate

02/23/2023, 1:36 AM
hmm - appears to be a transient error on the prefect cloud side. let us know if that pops back up again
j

Jarvis Stubblefield

02/23/2023, 7:22 PM
Thanks … I got a successful run after that… so all good for now, but will report back if I see it again.
👍 1