How to gracefully stop panel server from command line?

Hi all,

I’ve searched for the answer but no luck, so I’m asking here.

I’m able to start a panel serve command from command line, but how can I stop the panel server gracefully?

Killing the process doesn’t seem graceful to me; I’m not sure if resources get released.

Thanks

Hi @Mana,

For me hitting Ctrl-c killing resource hungry app frees up the resources on windows machine at least with what I use, it’s just become part and parcel of my testing within jupyter lab.

You can search server.stop() method, I recall reading or making use of in the past but not used recently

2 Likes

I’m also just hitting Ctrl+c. Never experienced issues with that except sometimes having to hit Ctrl+c multiple times to get it to shut down.

1 Like

That’s also how I do it, and that’s how I assume you kill a running process in general and in this case a web server, e.g. I think this is how you stop a flask or Django app. @Mana are you aware of other ways?

1 Like

I was looking for some “panel stop” form of solution. Then I could use it in scripts if necessary.
I’m sure I’ve seen that for some services, but I don’t recall which service it was.

Ok don’t hesitate to share more info on that if you manage to remember what services it was! :slight_smile:

At one of my previous employers, I used systemd to manage Panel apps.

1 Like