You shoudn't notice any real difference (except maybe a speed boost), but I just upgraded the web server running this site as well as several others hosted here, including VarChars.com.
I've finally stopped rolling my own Apache server and am using the standard Debian Apache 1.3. I've added in mod_gzip support, so my RSS feeds should all be compressed (yeay!) and my pages may load a tiny bit faster. I'm also using APC version 2 to cache compiled PHP pages. I also have mod_throttle (about which I have some doubts) and mod_log_sql running too.
Anyway, like I said you shouldn't notice anything. But I've been around the block enough to know that you probably will. So e-mail me at Jeremy@Zawodny.com if you notice any problems.
Update: Well that didn't take long. I'm back on the old server because something PHP related seems to be causing lots of segfaults. Boo! :-( This never came up in my testing. I'll try again later today after removing some suspect modules.
Update #2: As Danne suspected, it was a mysql client conflict between mod_log_sql and php. Grr. Now I need to build PHP from source, which partly defeats the purpose of using the all Debian approach. Grr.
Posted by jzawodn at November 29, 2004 08:19 AM
Like you, I badly wanted to use stuff like php code caching and mod_gzip on my webservers. When I did that, however, I ran into tons of problems with the web service crashing intermittently. After I removed those modules, everything went back to being very stable. Now the only extra addons that I run are the free Zend Optimizer and one for credit card processing for php.
You are getting segment faults because PHP is likely using it's own mysql librarys. You will need to recompile php to use mod_log_sql's to prevent this.
Argh, why do people insist on using Apache 1.3 when Apache 2.0 is stable, is so much faster, and can handle ten times the capacity, all on the same hardware?
I know that PHP doesn't yet support the worker MPM mode, but it's easy to get it to run in CGI mode, and Apache will still be faster even when all you're doing is serving up PHP pages.
Were you doing anything XML related when you got the segfaults? When you build apache by hand, it'll try to use it's own libexpat. When you build PHP, it'll be expecting the _system_ libexpat. This causes random segfaults when doing XML-related stuff (like RSS?)
The fix: when configuring apache, --with-expat=/usr
FWIW, mod_log_sql seems to have all sorts of issues, with or without PHP.
George:
Really?
I've been using it quite happily for over a year with PHP on my hand-rolled apache install.
Hmm.
Jeremy,
I blogged about a similar problem a while ago : http://blog.ipangels.com/blog/_archives/2004/5/17/71551.html
While I thought it was a FreeBSD problem, the solution may work for you.
Tristan:
Thanks, but I've tried that. I still get random setfaults on some children. :-(
just curious - why are you sticking with Apache 1.3 - is it just because you want to stick with Debian stable and thus enjoy the love of apt-get update?
I can see your point if that is the case - upgrading to Sarge will be a piece of cake - except for the recompiling PHP bit... pain in neck...had to do myself. But thats a small sacrifice in the bigger scheme of apt-get things.
Note to fellow readers of this blog - if you havent tried a native Deb install and apt-get, try it and you will start worshipping Richard Stallman the next morning. It a thing of pure beauty. ;-)
Sorry Jeremy... blabbing on....i'll shut up now.
I'm not running Debian stable, I'm running a mix of testing and unstable. I've just not seen a compelling reason to jump to Apache 2.0.
After some e-mail with George, I'm considering just ditching mod_log_sql in favor doing my own thing with a CustomLog and logging to a pipe.
That may be the easiest solution of all in the long term.
Someone actually seriously suggested that running PHP as a CGI under Apache2 would yield something faster than Apache1+mod_php? Wow. And PHP supports Apache2 Worker MPM just fine, it's just that many 3rd-party libraries that can be linked into PHP are simply not threadsafe so your chances of hitting weird problems under load are pretty high.
I may be slightly off topic (hardware rather than software), but what type box did you go with? I've been reading up on Opteron vs. Xeon with Apache2/MySQL and at least the benchmark differences are quite large.
http://www.gamepc.com/labs/view_content.asp?id=noconaopteron&page=13
http://www6.tomshardware.com/cpu/20030422/opteron-17.html#database_test
Benchmarks are often misleading, but I've read enough to decide on a Opteron for a new server I need to order in about two weeks.
(Not second-guessing you, just curious what you think).
hey - thanks for those benchmark links Stewart. The 64 bit versus 32 bit gap is quite wide (obviously) -the bottom chart really shows this off - i wonder if Jeremy is using a 64 bit compiled kernel yet or just sticking with bog standard 32 bit for now. I'm not sure if there's a Deb 64 bit kernel - there IS one for Suse and Mandrake already.
Just wondering why you chose APC over MMTurck Cache. Had you done/read comparisons?
I'd also like to hear your experiences with APC, and if you've tried Turck (now eaccelerator) as well.