Hey folks I've just upgraded to 0.15.5 and I'm now...
# prefect-server
e
Hey folks I've just upgraded to 0.15.5 and I'm now getting a Foreign key violation on starting a local prefect server. I run
prefect server start --postgres-port 5433
to start the server (have another postgres instance on my machine hence the port diff) then I get the following error. However despite this and the logs spitting out endless errors the I can still connect agents and register flows and they still work. Any ideas how I can fix this?
z
Hi @Elliot Oram - did you run the migrations as part of upgrading? You should be able to do so via the CLI
prefect server database upgrade
upvote 1
e
No such luck I'm afraid:
Copy code
$ prefect server database upgrade
Usage: prefect server [OPTIONS] COMMAND [ARGS]...
Try "prefect server -h" for help.

Error: No such command "database".
k
What did you upgrade from?
e
0.14.6
z
Ah sorry about that, the command is
prefect-server database upgrade
e
Copy code
$ prefect-server database upgrade
zsh: command not found: prefect-server
z
I'm sorry I hadn't realized you were runnning Server only using Prefect Core. I doubt migrations are the problem unless you're seeing errors on startup. The particular constraint referenced in the stack trace,
log_flow_run_id_fkey
was added over a year ago. It seems like something is trying to write logs for a flow run that no longer exists. • Do you know what is trying to write these logs? The most likely candidate is a Prefect agent • Did you persist data when restarting Server? If not, it's possible any running flow runs would try to write remaining logs and generate these errors