Hello Erik
thanks for your responce!
I started reading a little bit related to GIL. I think this is the root of my problem. I'm using xhtml2pdf to generate some large pdf's (up to 200 pages).
I do know i have to rewrite this code to run in background (e.g. using celery).
However i want to understand, why gevent is blocking. As i understood, gevent spawms a new 'microthread' that does the long lasting work. My mistake was/is that i thought a gevent thread would be a full featured gunicorn thread. but this can't be of course. wouldn't make sense to use gevent otherwise ...
However this is not a big issue, as the function itself is used only in admin by some special users. I can 'train' them to create only smaller pdf that get created under 10 seconds ...
Nevertheless it would be nice to know, what kind of "heavy work" can be done asynchronous with gevent. Reading the documentation i can't figure out, where gevent would realy help improving to serve more pages/sec.
-- thanks for your responce!
I started reading a little bit related to GIL. I think this is the root of my problem. I'm using xhtml2pdf to generate some large pdf's (up to 200 pages).
I do know i have to rewrite this code to run in background (e.g. using celery).
However i want to understand, why gevent is blocking. As i understood, gevent spawms a new 'microthread' that does the long lasting work. My mistake was/is that i thought a gevent thread would be a full featured gunicorn thread. but this can't be of course. wouldn't make sense to use gevent otherwise ...
However this is not a big issue, as the function itself is used only in admin by some special users. I can 'train' them to create only smaller pdf that get created under 10 seconds ...
Nevertheless it would be nice to know, what kind of "heavy work" can be done asynchronous with gevent. Reading the documentation i can't figure out, where gevent would realy help improving to serve more pages/sec.
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d419ae4c-ff44-4a38-8adb-ae23de8a1342%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment