Thursday, March 24, 2016

Django, uwsgi, gevent, Pymongo

Hi,

We have a live site running on Django and uwsgi. Pymongo is being used in the application for MonogoDB. uwsgi is being used to run the Django application.

As per Pymongo docs, it has been suggested to use Gevent monkey patching:

https://api.mongodb.org/python/current/examples/gevent.html

Being new to Django and uwsgi, would appreciate if anyone could suggest - if to call Gevents monkey.patch_all() in wsgi.py or manager.py.

Also, as per the Pymongo documentation, only threads and sockets are being used and are to be replaced. Hence, can I just call monkey.patch_thread() and monkey.patch_socket()?

Also, would there be any potential issues that could arise due to the above?

uwsgi version is 2.0.12 and django version is 1.8.4.

Looking forward to clarifications...

Thanks,


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/08e89144-8eba-4a0e-b424-a6d05c2ff730%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment