-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
use --preload but workers did not share memory from master process #3178
Comments
Jimmy9507
changed the title
use --preload but workers did not share memory from parent process
use --preload but workers did not share memory from master process
Mar 26, 2024
i am not sure what you mean by sync can not meet high concurrency. behind a
buffered proxy it will. Some large eebsite are runnging it. What are your
requiemsnts? Do you need websockets or sse?
Le mar. 26 mars 2024 à 08:34, Junming Huang ***@***.***> a
écrit :
… Hi,
To save memory, I try to use --preload so only master process will upload
large object in memory, and child processes can share it and don' t have to
upload duplicate objects to memory.
Here is the command I use, However, the large object is still uploaded
multiple times by child process.
gunicorn -b 127.0.0.1:8090 --worker-class gevent app:app --timeout 300 --keep-alive 60 --workers 5 --preload
However, when I use worker class sync. I see the object only uploaded
once in memory.
gunicorn -b 127.0.0.1:8090 --worker-class sync app:app --timeout 300 --keep-alive 60 --workers 5 --preload
But sync can not meet my requirement of high concurrency. Does anyone see
the same problem before?
Thanks in advance.
—
Reply to this email directly, view it on GitHub
<#3178>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADRIWPVWJMILSOZZ7FJ4TY2EQHZAVCNFSM6AAAAABFIMBH5KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIYDONBWGE2DKNQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
To save memory, I try to use
--preload
so only master process will upload large object in memory, and child processes can share it and don' t have to upload duplicate objects to memory.Here is the command I use, However, the large object is still uploaded multiple times by child process.
However, when I use worker class
sync
. I see the object only uploaded once in memory.But
sync
can not meet my requirement of high concurrency. Whysync
works butgevent
does not work?Does anyone see the same problem before?
Thanks in advance.
I am using Flask + Gunicorn
The text was updated successfully, but these errors were encountered: