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

how to share object in work process, and timing to change object. #1692

Closed
bywangxp opened this issue Jan 29, 2018 · 4 comments
Closed

how to share object in work process, and timing to change object. #1692

bywangxp opened this issue Jan 29, 2018 · 4 comments
Labels

Comments

@bywangxp
Copy link

No description provided.

@bywangxp
Copy link
Author

can gunicorn deal with ? emgency!

@jamadden
Copy link
Collaborator

It's not very clear what you're asking.

gunicorn doesn't contain any support for sharing objects between different worker processes. You'll need to use your own approach for that. There are many options depending on your needs. These include:

  • a NoSQL data store like Redis or ZODB
  • a SQL database like MySQL or sqlite
  • a dedicated process handling all the data that you communicate with, such as a Celery queue or even your own use of sockets.

@bywangxp
Copy link
Author

1.can i share the file in the different work process?
before start gunicorn, i read the file in memory, and time to change the memory。

@haolujun
Copy link

In some case, for example : machine learning . Always have a big data model, and this model is read only. In order to use multi-core on a computer, we should use multi-processor instead muti-thread, so gunicorn can share common data between all processors will be very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants