I'm back!

I've got both good and bad news.

The good: mod_wsgi 4.0 worked perfectly well.

The bad: I still did not manage to fine tune the apache2+mod_wsgi
+monitoring settings to a point where I was in control.

I have an issue, definitely to be solved outside wsgi, of too many
slow requests piping up at times.
When it happens, there's a starvation effect that completely locks
apache2 - it has to be restarted, or it won't serve any request
anymore.
The slow requests are database intensive, and can't be taken
asynchronously easily. There are really few of them, but when more
than a handfull happen together problems start.

I had setup a monit to restart apache2 when it becomes irresponsive,
but getting a correct timing for this is difficult, and I end up
overcharging the machine more than anything by restarting slow
processes that were doing ok.
Also, at times of high traffic I could end with monit restarting
apache2 several times in a row, and ending up abandoning leaving with
a zombie apache2.

Again I repeat this has nothing to do with mod_wsgi itself. I tried
switching to gunicorn (I already had nginx as a frontend);
performances itself are quite similar (I did not benchmark, but at
least new relic was giving similar throughput).
But it's so much easier to tune (the settings are few, and there isn't
an apache2 to take care of) and monitor (with supervisord) that I'm
sticking with this solution for the time being. Had I a better
knowledge of Linux/Apache internals (or maybe if 4.0 was official with
a precise doc for the news settings) I might have achieved the same
results with mod_wsgi.

Thanks Graham for your support, I definitely do not mean to invite
others to move away from mod_wsgi that has been serving great until
this problem arose, but I felt I should share my feedback. BTW, the
apache2/mod_wsgi confs are still there and I can switch from one to
another with a few line changes...

Stefano



On Dec 13 2011, 12:53 pm, stefanoC <[email protected]> wrote:
> I'm building / installing from source on Ubuntu (old one!).
>
> I'm currently making some tests on the pre-production machine before
> we jump on production, and the biggest headache is still the best
> apache2 worker conf that will not overrun the machine.
>
> But I'll keep posted!
>
> On Dec 11, 7:54 pm, Rodrigo Campos <[email protected]> wrote:
>
>
>
> > On Tue, Dec 06, 2011 at 02:47:49AM -0800, stefanoC wrote:
> > > Finally managed to jump from
> > >http://serverfault.com/questions/335633/apachemod-wsgi-configuration-...
> > > to this mailing list.
>
> > Interesting thread. We might be hitting some similar issue
>
> > > I am ready to try the switch, already compiled and run mod_wsgi 4.0 on
> > > a test machine with the same config as usual.
>
> > We were about to try it, but some other stuff got in the way. We plan to do 
> > it,
> > but not sure when :(
>
> > But if you do it before us, please let us know how it went and how you did 
> > it.
> > Are you using debian/ubuntu ? Did you make a debian package ? I was 
> > planning to
> > make a debian package (we are using ubuntu) based on debian's package, using
> > uupdate (I think it should be that easy, although I didn't try to do it yet)
>
> > Thanks,
> > Rodrigo

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to