Mar. 3rd, 2010

boutell: (Default)
This is two days late, I know. I wrote it Sunday but forgot to post it Monday what with the complete and total moving chaos. My humble apologies.

I demonstrated everything again
(Das blinkenlights, the strobing yellow green)
And offered you a sheet, a hope, a pen,
Spontaneously lifted from my jeans'

Back pocket. That was just coincidence.
I never carry one. Ignore the stain.
Ignore the partial chain of evidence.
It's not a coolant leak, it's only rain

That spatters on the contract. Buy the ship
And any moment you'll be in the sky.
Ignore the geiger counter. Nothing drips
Once you're in orbit. Honey, this thing flies

Like any bird and sings as sweet a song.
(And if not, you won't notice very long.)
boutell: (Default)
Dear extremely amazing Apache geeks,

I don't ask much. I just want PHP to run in one process pool WITH a shared APC cache, and Apache to be in its own process pool as a front end so it can serve static stuff really, really fast, and not pin down a huge Apache process with mod_php in it when it's just serving something statically. Better yet I'd like to use the worker MPM so it's threaded and even more ridiculously fast.
fastcgi is supposed to be the way... clicky if you think you might be able to help. )
Thanks for your advice!
boutell: (Default)
Thanks to all, especially [livejournal.com profile] iamo, for the thoughtful responses to my question about fastcgi.

I eventually figured out that the fastcgi "dynamic server" could live in a shared folder, resulting in only one set of PHP processes, if I used a simple Alias directive to map that path into all of the virtual sites.

With that change I was able to do this:
<IfModule mod_fastcgi.c>
  # One shared PHP-managed fastcgi for all sites
  Alias /fcgi /var/local/fcgi
  # IMPORTANT: without this we get more than one instance
  # of our wrapper, which itself spawns 20 PHP processes, so
  # that would be Bad (tm)
  FastCgiConfig -idle-timeout 20 -maxClassProcesses 1
  <Directory /var/local/fcgi>
    Options ExecCGI
  </Directory>
  AddType application/x-httpd-php5 .php
  AddHandler fastcgi-script .fcgi
  Action application/x-httpd-php5 /fcgi/php-cgi-wrapper.fcgi
</IfModule>


Coupled with the wrapper script I showed before, that works like a big working thing.

Then I switched Apache to the worker MPM rather than the prefork MPM (again, thanks for the suggestions), which really blew performance for static files through the roof.

The only remaining catch: no support for php_value settings in .htaccess files. Doh. Fortunately the settings I had in place there were easily shared among the virtual sites in question, so I swept them to php.ini.

(Yes, I know I really shouldn't have .htaccess files on sites where I'm concerned about performance anyway.)

Thanks again for the tips!

September 2014

S M T W T F S
 123456
78910111213
14151617181920
2122232425 2627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 17th, 2017 10:19 pm
Powered by Dreamwidth Studios