Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lingering browser processes #1823

Open
mzydmer opened this issue May 16, 2024 · 4 comments
Open

Lingering browser processes #1823

mzydmer opened this issue May 16, 2024 · 4 comments
Labels
question Further information is requested severity:low Minor issues, code cleanup, etc

Comments

@mzydmer
Copy link
Contributor

mzydmer commented May 16, 2024

Describe your question

I run the main,options is --port 3000 --workers 1

when I opened a web server ,python process adding two ...
image

when I closed the web server, web socked was closed. But Two additional process were exists!

Additional context

Each time a websocket connection is established, fastApi should add a thread to maintain the connection.

I want to know why the new python process were created and how to optimize this

@mzydmer mzydmer added the question Further information is requested label May 16, 2024
@SmartManoj
Copy link
Collaborator

Could you share the arguments of the processes too?

@SmartManoj SmartManoj added the waiting for input Need more information from the author to proceed further. label May 17, 2024
@iFurySt
Copy link
Collaborator

iFurySt commented May 17, 2024

image

i think three processes are normal :)

if you find any situation will cause the process number increase, please let us know.

@mzydmer
Copy link
Contributor Author

mzydmer commented May 17, 2024

image

i think three processes are normal :)

if you find any situation will cause the process number increase, please let us know.

  • It will increase if I open more browsers. There will be no more than 5 processes. I will try to deploy the application to an online environment to see if multiple people can use.

@rbren
Copy link
Collaborator

rbren commented May 18, 2024

Yes--each browser spawns its own process. Sounds like maybe we're not cleaning them up?

@rbren rbren changed the title Why does python process are created every time I start a web server? Lingering browser processes May 18, 2024
@rbren rbren added severity:low Minor issues, code cleanup, etc and removed waiting for input Need more information from the author to proceed further. labels May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested severity:low Minor issues, code cleanup, etc
Projects
None yet
Development

No branches or pull requests

4 participants