On Thu, Feb 6, 2014 at 10:08 PM, Gytis <gy...@fmu1.net> wrote:

> On Friday, February 7, 2014 7:40:10 AM UTC+2, Christian Hammond wrote:
>> If you repeat that wget test, say, 10 times, does that delay stay
>> consistent?
> Yes
>> When using mod_wsgi in embedded mode (which is what the standard
>> configuration files make use of), Apache needs to load in all the modules
>> and go through our initialization each time it sets up a new process (or
>> worker thread, in your case). That's a first-time penalty, and depending on
>> your main Apache setup, can be noticeable. However, after those
>> processes/workers are primed, it should load fast.
>> We recommend using Apache with prefork instead of workers, though. You'll
>> have fewer issues with that setup using Django and Review Board.
> Switched to prefork. Almost the same. Now if i run wget for 10 times,
> sometimes only the first request takes long, but its like 10% max.
> What bothers me is the consistent 3 seconds minimum request time (not 4
> not 5 and not 2). Could this be some sort of timeout?
> Any more ideas?

There isn't any timeout involved in that process in our code, but there
could be something outside our code that we interact with.

Once the request gets to our code, we simply check if the requesting user
has an active session (which involves a database query), and if not, issue
a redirect to the browser. (There's also some initialization code, but that
should be quick).

That should never take 3 seconds unless there's a massive delay in talking
to the database, or Apache is taking a long time getting the request to
Django, or something else that's unexpected is happening.

Let's try to rule out Apache next, and focus solely on everything happening
at the Django + Review Board layers.

On the server, run:

    rb-site manage /path/to/site runserver

(Or pick another port if that is taken.)

That's going to make use of Django's built-in single-threaded development
server. You can then repeat the request using that port and see if you
still get the 3 second delay.


Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com

Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
Happy user? Let us know at http://www.reviewboard.org/users/
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to