08/09/2022, 2:11 AM
Hi. This is a new error I got. Anyone know why it just started appearing? Fails like this once out every 100 tasks. Anyone know why it just started appearing?
Flow could not be retrieved from deployment.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/prefect/", line 247, in retrieve_flow_then_begin_flow_run
    flow = await load_flow_from_flow_run(flow_run, client=client)
  File "/usr/local/lib/python3.9/dist-packages/prefect/", line 104, in with_injected_client
    return await fn(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/prefect/", line 47, in load_flow_from_flow_run
    await storage_block.get_directory(from_path=None, local_path=".")
  File "/usr/local/lib/python3.9/dist-packages/prefect/", line 98, in get_directory
    shutil.copytree(from_path, local_path, dirs_exist_ok=True)
  File "/usr/lib/python3.9/", line 568, in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
  File "/usr/lib/python3.9/", line 522, in _copytree
    raise Error(errors)
shutil.Error: [('/home/app/app/.prefect/orion.db-shm', './.prefect/orion.db-shm', "[Errno 2] No such file or directory: '/home/app/app/.prefect/orion.db-shm'")]
šŸ‘€ 1

Mason Menges

08/09/2022, 7:09 PM
Hey @js10 Do you have an example for the flow/tasks that are being run so we can try and reproduce this?

Bianca Hoch

08/09/2022, 7:10 PM
Also, QQs, ā€¢ What version of Prefect are you running? ā€¢ Around when did this start happening?


08/10/2022, 2:54 AM
Removed some stuff so this is really pseudocode, but it's just two simple flows in one file that execute at 15 and 30 min intervals.
import sys

import pytz
import uuid
from datetime import datetime

from prefect import flow, task, get_run_logger

def store_data(data, kw, timeframe, geo):
  logger = get_run_logger()
  <|>(f"saved some stuff to db from the internet")

def store_7_day():
  store_data(data, coninuous_7_day, timeframe='123', geo='US')

def store_4_hour():
  store_data(data, coninuous_7_day, timeframe='123', geo='US')

if __name__ == "__main__":
prefect = "^2.0.2"
this started happening when I upgraded to 2.0.2
could it be an issue with the same container executing the two flows?

Anna Geller

08/12/2022, 4:26 PM
looks like you got to a point where you hit the limits of SQLite and it may be time to consider upgrading either to Cloud 2.0 or to Postgres -- the reason is that it's essentially a single file not meant for concurrent writes you can sign up for Cloud 2.0 using
šŸ‘ 1