-
HarlinS joined the channel
-
nobodi has quit
-
vdboor has quit
-
GraysonBriggs has quit
-
Ast_isolt_ joined the channel
-
Ast_isolt_ has quit
-
Ast_isolt_ joined the channel
-
kingarmadillo joined the channel
-
Ast_isolt_ has quit
-
FlavioZ has quit
-
Ikoru joined the channel
-
XofP has quit
-
XofP joined the channel
-
DementedShaman joined the channel
-
fikka has quit
-
fikka joined the channel
-
rokups has quit
-
CAPITANOOO joined the channel
-
CAPITANOOO has quit
-
Guddu has quit
-
fikka has quit
-
jas02 has quit
-
jas02 joined the channel
-
inad922 joined the channel
-
kingarmadillo has quit
-
jalalsfs joined the channel
-
vdboor joined the channel
-
ironfroggy_ joined the channel
-
fikka joined the channel
-
jalalsfs_ has quit
-
inad922 has quit
-
Guddu joined the channel
-
ironfroggy has quit
-
ironfroggy_ has quit
-
joshbright has quit
-
adsworth_ has quit
-
dimino has quit
-
READ10 has quit
-
inad922 joined the channel
-
|oLa| joined the channel
-
maxb has quit
-
maxb joined the channel
-
phiwer has quit
-
gacrux joined the channel
-
stickperson joined the channel
-
stickperson
anybody here deploying a django app with gunicorn and an async worker? i'm giving it a try but requests are still being processes sequentially.
-
apollo13
define async worker?
-
and what makes you think that they are processed sequentially
-
nkuttler
it's a gunicorn worker
-
apollo13
also how did you make your database connection async etc…
-
yeah but which type of "async"
-
ironi joined the channel
-
czart_ joined the channel
-
mcspud
the one that isn't synchronous apollo13
-
duh
-
czart has quit
-
stickperson
-
apollo13
stickperson: well async doesn't "just" work, you have to ensure that your code works with it too
-
what makes you think that you need async workers?
-
stickperson
apollo13: with a sync worker i'm running 8 workers and can only process 8 requests at a time. thinking about handling more than than.
-
knbk
stickperson: did you set the number of threads?
-
stickperson
knbk: i did not. i thought 1 would be fine with an async worker.
-
apollo13
stickperson: 8 requests at a time at 100ms/request is already 80 requests / second, what are you trying to achieve?
-
knbk
gthread workers default to 1 thread
-
iamkhush has quit
-
apollo13 would stay with sync workers unless you know what you are doing
-
stickperson
apollo13: i don't have a set number, but our db queries are slooow so i figured i'd try to work on something else while someone fixes them.
-
apollo13
stickperson: then changing to async will not do anything I think
-
especially not with gthread
-
nimomo joined the channel
-
stickperson
apollo13: hm, even if the query takes say 3s when there is 1-10 concurrent requests?
-
apollo13
a) python has a GIL, so only one thread can ever run, that is unless the db adapter properly releases the gil
-
at which point a properly threaded sync worker has roughly the same throughput
-
and a query that takes 3s on a webpage is something you should get rid of yesterday, especially if it is a customer facing page
-
stickperson
apollo13: ok, so like you said earlier if i did want to give async a try i'd have to write the db connection/call to be async as well
-
that makes sense. makes me wonder if anyone actually does use an async worker with django
-
apollo13
they do
-
but you need to think about the conesequences
-
nkuttler
killed our db
-
apollo13
async gevent worker + monkey patched psycopg will easily spawn 1000 connections to the db
-
ie dead
-
Kangermu has quit
-
so you'd want connection pools and whatnot
-
stickperson
yea
-
apollo13
but the easy fix would be to fix your queries
-
stickperson
well alright then. i'll wait until the queries are fixed and will take it from there.
-
thanks for the info
-
Kangermu joined the channel
-
lavalamp joined the channel
-
Itkovian joined the channel
-
|oLa| has left the channel
-
bradfordli123 joined the channel
-
nkuttler
actually, we have a raid of ssds now for the db. maybe i should have another look..
-
DrYockel has quit
-
apollo13
I'd personally still stay away from async
-
nkuttler
yeah, the overhead probably isn't worth it
-
apollo13
at least as long as possible
-
nkuttler
and the slow quries still fill up the queue
-
joshbright joined the channel
-
brainproxy has quit
-
stickperson
true
-
knbk
the gthread worker isn't really async, is it? It's just a thread pool where each thread synchronously handles requests
-
uda has quit
-
felixx has quit
-
brainproxy joined the channel
-
veduardo has quit
-
m8 has quit
-
apollo13
knbk: yeah, at least that is what I read from the docs
-
gaiohttp would be async
-
exaroth joined the channel
-
r29v has quit
-
czart_ has quit
-
jarshwah has quit
-
jeffspeff joined the channel
-
XofP has quit
-
jas02 has quit
-
jas02 joined the channel
-
damienxx has quit
-
exaroth has quit
-
jas02 has quit
-
jas02 joined the channel
-
jas02 has quit
-
jas02 joined the channel
-
detseg has quit
-
dissonant has quit
-
blackcross has quit
-
FD91224 joined the channel
-
abadger joined the channel
-
aossama has quit
-
roadie joined the channel
-
detseg joined the channel
-
blackpingus has quit
-
milardovich joined the channel
-
lavalamp has quit
-
Xard has quit
-
novigradian joined the channel
-
cseder has quit
-
jas02 has quit
-
aossama joined the channel
-
la_croix joined the channel
-
jas02 joined the channel
-
netheranthem joined the channel
-
cseder joined the channel
-
Xaldafax joined the channel
-
jas02 has quit
-
jas02 joined the channel
-
kingarmadillo joined the channel
-
jas02 has quit
-
slav0nic has quit
-
milardovich has quit