See if the php-fpm setting for max connection restart will help
On Sat, Oct 16, 2010 at 6:03 PM, Brian Tafoya <btafoya@gmail.com> wrote:
> We are running CentOS 5.5 x86_64, nginx 0.8.36, MySQL 5.1.51, php-fpm,
> php 5.3.3 hosting three Magento stores with two dedicated servers.
> (One web, one db, networked together via crossover). Our business is
> costumes (www.fiercecostumes.com), and as you can imagine we are
> pretty busy right about now.
>
> We are experiencing some issues as the load increased and I am not
> exactly sure what I should be tweaking. NGINX seems to be just
> screaming along but it has several times this week just stopped. The
> only thing I can figure is the php-fpm workers all froze or I didn't
> have enough of them. Since then I have increased the php-fpm worker
> count from 15 to 35 with a max of 75 and NGINX has not stopped since.
> I am experiencing issues where the site will freeze up, and php-fpm is
> reporting timeouts in the magento front controller.
>
> What would be the best way for me to gauge what the worker settings
> should be? I am new to NGINX and php-fpm... I am 100% sold and will
> never turn back if I can help it! (If I could run a native
> nginx/php-fpm windows combination I would even use it for my
> development!)
>
> Brian Tafoya
> www.briantafoya.com
> www.premasolutions.com
>
>
> On Sat, Oct 16, 2010 at 2:27 PM, <public@procontractors.dk> wrote:
> > Love the Microsoft word part!
> >
> > We have CentOS 5.5 x86_64, nginx 0.7.65, MySQL 5.1.50, php-fpm, php
> 5.3.3,
> > memcached, running Magento on a Hyper-V image
> > - That is somewhat Microsoft bottlenecked.
> >
> > Think the biggest challenge was the change in the config language.
> > Did not see that coming before I had deployed my previous std. php-fpm
> > config.
> >
> >
> > --
> > Regards
> > Nils Eriksen
> > ---
> > http://www.procontractors.eu/
> >
> > -----Original Message-----
> > From: highload-php-en@googlegroups.com
> > [mailto:highload-php-en@googlegroups.com] On Behalf Of Antony Dovgal
> > Sent: 15. oktober 2010 11:20
> > To: highload-php-en@googlegroups.com
> > Subject: Re: some experience with FPM with 5.3.3
> >
> > On 10/15/2010 01:01 PM, Alexey A. Rybak wrote:
> >> 1) Building and running C-program which checks libevent version could
> >> be more user friendly.
> >
> > Surely you're expected to have some experience with the sources if you
> build
> > everything from scratch yourself, don't you think so?
> >
> >> Now you just get a message saying like oops you dont have
> >> libevent>0.4.11 installed. However there could be much more cases
> >> like:
> >> - unable to compile the test (like no headers were found etc)
> >> - unable to build the lest (bad or not found library)
> >> - successfully run but found wrong version I think there should be the
> >> way to extract the state and give it to the user.
> >> There are many complains over the internets saying guys welcome to
> >> hell when you got this configuration error for libevent and fpm ;) The
> >> only way to fix it is to open configure, extract the code, try to
> >> build, find out what's the problem there, fix, build, check version,
> >> and go back to configure. This is not a very big rocket science but
> >> for the first time it just seems so crazy (I did it like 3 or 4 times
> >> already :))))
> >
> > There is always a possibility to shoot yourself in the foot, no matter
> how
> > 'user-friendly' and extensive the configure checks are.
> > That said, you're welcome to improve the checks.
> > Right now, it might report that you don't have the required libevent
> version
> > if you've screwed up your system bad enough.
> >
> >> 2) Why do we have php and php-cli binary in bin and php-fpm binary in
> > sbin?
> >
> > Short answer: because.
> >
> > Long answer: php-cli is expected to be used by any user, but php-fpm is a
> > service/daemon binary and no user except root is expected to run it.
> > See for example where Nginx, Apache, or MySQL put their server binaries.
> >
> >> 3) By default we don't have any etc/php-fpm.conf
> >
> > Yes we do.
> >
> > # make install
> > Installing PHP SAPI module: fpm
> > Installing PHP CLI binary: /tmp/f/bin/
> > Installing PHP CLI man page: /tmp/f/man/man1/
> > Installing PHP FPM binary: /tmp/f/sbin/
> > Installing PHP FPM config: /tmp/f/etc/ <------ what's that, huh?
> > Installing PHP FPM man page: /tmp/f/man/man8/
> > Installing build environment: /tmp/f/lib/php/build/
> > Installing header files: /tmp/f/include/php/
> > Installing helper programs: /tmp/f/bin/
> > program: phpize
> > program: php-config
> > Installing man pages: /tmp/f/man/man1/
> > page: phpize.1
> > page: php-config.1
> >
> >> 4) Just copying etc/php-fpm.conf.default to etc/php-fpm.conf doesn't
> >> work: we have pm.dynamic by default (why?) and the following error
> >> occures:
> >
> > Right, you are expected to open the config file and actually read and
> > UNDERSTAND it in order to get it working.
> > This is not Microsoft Word and you have to know what you're doing.
> >
> >> 5) Where is the run script, at least some example? Well, I understand
> >> this should be a part of linux distribution but there should be at
> >> least something with stop-start-reload etc for those who play with
> >> sources.
> >> Here goes Andrei's old script (we used it on different for SUSE
> >> distributions) see attach (you need to change just prefixes for the
> >> paths) - can we put this into the distribution as just an example of
> >> writing these scripts so people could just see example and write their
> >> own if this didn't work?
> >
> > sapi/fpm/init.d.php-fpm
> > It's mostly for Linux, though, and copying it along with the binary
> doesn't
> > make much sense to me - you'll probably want to put it to /etc/init.d
> > yourself anyway (if ever).
> >
> > --
> > Wbr,
> > Antony Dovgal
> > ---
> > http://pinba.org - realtime statistics for PHP
> >
> >
>