[Python] FastAPI server still running after I close it. How to stop it properly? [duplicate]

Discussão em 'Python' iniciado por Stack, Janeiro 23, 2025.

  1. Stack

    Stack Membro Participativo

    I’m facing an issue where my FastAPI server continues to run and respond to requests even after I close the terminal or stop the server. It doesn't stop as expected, and I’m unable to figure out why it keeps running in the background.

    I tried pressing Ctrl + C to stop the server, closing the terminal, and checking for any background processes holding the port, but the server keeps responding to requests as if it’s still running.

    Here’s the command I use to run the app:

    uvicorn app:app --reload


    Is there something I’m missing here? How do I stop the FastAPI server completely?

    Any help will be appreciated! Thanks in advance!

    Continue reading...

Compartilhe esta Página