https://prefect.io logo
Title
a

Adrien Boutreau

07/03/2020, 1:03 PM
Hello! I have an issue in production, graphql seems to be down : when I call xxx.eu-west-2.compute.amazonaws.com:4200/graphql I have 4200: Connection refused and when I check docker container ls it's not on the list - do you know how I can restart it ? PostGre is also down
j

josh

07/03/2020, 1:04 PM
Hi @Adrien Boutreau, just to confirm, this is with Core’s server?
a

Adrien Boutreau

07/03/2020, 1:04 PM
yes
j

josh

07/03/2020, 1:04 PM
How did you start the services originally? You should be able to start them up again with something like
prefect server start
if you used that command
a

Adrien Boutreau

07/03/2020, 1:05 PM
yes I did it and everything was working, after few days, post gre and graphql seems to stop by themself
I don't know the reason
j

josh

07/03/2020, 1:06 PM
What type of compute/machine are you running them on? It’s possible that whatever underlying system you use was rolled/restarted/etc.
a

Adrien Boutreau

07/03/2020, 1:07 PM
it's a AMI EC2 instance
j

josh

07/03/2020, 1:09 PM
I’m don’t have a huge swatch of knowledge of EC2 but it looks like you can put a script in
/etc/rc.local
and it will run it every time the system boots. That’s probably where you would want to put a script that calls
prefect server start
. Also I would recommend using the volume mount option so you don’t lose your Postgres data every time it starts again
prefect agent start --use-volume --volume-path /some/path