-
Notifications
You must be signed in to change notification settings - Fork 8
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
Winloop is not work in uvicorn multiprocessing #11
Comments
@yangy996 There is still some work to be done around multiprocessing including |
The current version is 0.1.0. |
I was able to get it to spawn in 2 pids using a test via the aiomultiprocess library I will try to extend this into uvicorn very soon. |
I'm closing this issue because we solved this one a long time ago. |
In uvicorn, I have added a new file “winloop.py”.
![image](https://private-user-images.githubusercontent.com/15188456/290707093-13e3cd91-de78-4116-977b-995af5e1009a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMjI4NDIsIm5iZiI6MTcyNjEyMjU0MiwicGF0aCI6Ii8xNTE4ODQ1Ni8yOTA3MDcwOTMtMTNlM2NkOTEtZGU3OC00MTE2LTk3N2ItOTk1YWY1ZTEwMDlhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDA2MjkwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNlM2NjYzA2Mjk4ZjRhZDEyNDk1Y2ZlZWQxN2ExNWQwZDRjYTllODc4ZWI3NjU4ZmZjNzAxMmMwNWE2NDhlZWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.1I-z4VdixX5RfV71hI1nMuIJyU2zxoAak8EMYFe_gdk)
![image](https://private-user-images.githubusercontent.com/15188456/290707270-c6b15843-d463-4c86-84a9-41c0d924c820.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMjI4NDIsIm5iZiI6MTcyNjEyMjU0MiwicGF0aCI6Ii8xNTE4ODQ1Ni8yOTA3MDcyNzAtYzZiMTU4NDMtZDQ2My00Yzg2LTg0YTktNDFjMGQ5MjRjODIwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDA2MjkwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEwZDJkOWI4Mjg2N2NiM2M5ODQ0MmFmNjEyYjdlMmI1NDE4NGRmNWRkYmE4ZWYyMjg3ODY0Yjg5NTYzN2Q4ZjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.p8AwOAtJmlTVSig2Y8AHGjKxkModdIaHacSWMXW_Ox0)
uvicorn/config.py:
Next:
from uvicorn import run
run("app_compat:create_app_fastapi", host="0.0.0.0",
workers=int(args["workers"]),
port=int(port),
loop="winloop",
factory=True)
Result:
![image](https://private-user-images.githubusercontent.com/15188456/290707596-82f58298-f694-40e5-ae05-e8a95d1752de.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMjI4NDIsIm5iZiI6MTcyNjEyMjU0MiwicGF0aCI6Ii8xNTE4ODQ1Ni8yOTA3MDc1OTYtODJmNTgyOTgtZjY5NC00MGU1LWFlMDUtZThhOTVkMTc1MmRlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDA2MjkwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBlZGY1N2ZiMGUzYzg2NmFkNjBjNWQ5Njk0Yzg1OWMzM2ViNzVkNDEzZWUxNTQ0YjY1OGRmMzI3YjYyZDI2NGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.4JNaIfSpf6nbdrEP_kOZmVK8v8q8y-tKruD-Ifv5jvE)
Pid is 23052 and 4604.
Just,It is only running on PID 4604.
The text was updated successfully, but these errors were encountered: