Thanks for your reply.
Please consider that I have multiple flows with tasks that are taking a few minutes to finish with daily schedules and all of them are facing the same issue. Here you can find information on a simple task which I created to quickly replicate my issue.
flow.py:
import time
from prefect import task, Flow
if __name__ == '__main__':
@task(log_stdout=True)
def my_task() -> None:
time.sleep(1)
with Flow( "My Flow") as flow:
my_task()
flow.register(project_name='My Project', labels=['my_label'])
the project gets build into docker image with a custom “prefect.toml” file and the following command:
CMD ["prefect", "agent", "local", "start", "-l", "my_label"]
After running the docker container, flow gets registered with below command (inside the container):
python3 flow.py
Inside the Prefect frontend, in the flow setting “SCHEDULES” table, I’m setting a schedule to “Run every 1 minute” then turning the “SCHEDULES” radio button on.
It will successfully runs all the scheduled 10 runs and no more runs get scheduled.
The Prefect Server itself is hosted in an Air-Gaped network using official provided compose file with some small modification to match our infrastructure. I see no errors in “hasura”, “graphql” and “frontend” container logs. Only below error keeps popping up in the “apollo” container which is caused by having no internet access.
Sending telemetry to Prefect Technologies, Inc.: {"source":"prefect_server","type":"heartbeat","payload":{"id":"feb0a78a-8556-464c-a7ec-635be60fb057","prefect_server_version":"2022.04.14","api_version":"0.2.0"}}
(node:26) UnhandledPromiseRejectionWarning: FetchError: request to https://sens-o-matic.prefect.io/ failed, reason: connect ETIMEDOUT 172.217.20.83:443
at ClientRequest.<anonymous> (/apollo/node_modules/node-fetch/lib/index.js:1491:11)
at ClientRequest.emit (events.js:315:20)
at TLSSocket.socketErrorListener (_http_client.js:469:9)
at TLSSocket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
(node:26) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 7920)