No More Downtime!

It seems that every time we get on Slashdot (or Digg for that matter), we go down. It doesn’t make a difference just how well prepared we are, what kind of hosting we’re using, what the application being Slashdotted is, etc. It’s the unwritten law at NST. But we hope this’s the last time we ever experience downtime for a while.1

Why? We’ve left PHP. Well, not exactly. It seems that PHP doesn’t give a damn about Windows users. PHP has repeatedly stated that “we’re aware of [….] serious stability issues on Windows…” But they’ve done nothing about it for almost a year now. Their advice is to abandon (their own) PHP ISAPI connector and instead fallback to the ages-old and incredibly slow PHP CGI solution.

A couple of years ago, a more efficient “version” of CGI, aptly dubbed “FastCGI,” was invented. Theoretically, FastCGI retains the stability and reliance of the old CGI method, but is implemented via its own (actually working) ISAPI/NSAPI extension and incorporates some changes in the lifeline of a binary. But in practice, the original FastCGI for IIS implementation is outdated and almost as unreliable as ISAPI on IIS.

At NeoSmart Technologies, we’ve been using the original PHP ISAPI implementation to get our various PHP-powered scripts up and running. It’s proven to be as unreliable as only badly-coded software can be, but falling back to CGI as a “solution” just wasn’t going to happen. But now we’ve come across a much un-mentioned FastCGI implementation created by Microsoft themselves in an effort to increase the reliability of PHP on IIS since PHP weren’t doing their jobs.

The not-so-sharply-named “FastCGI for IIS” plugin seems to be the real deal. At the moment, it supports IIS 5 & 6 via the now-dying ISAPI infrastructure – and is a complete modular implementation for IIS 7. Unlike the other FastCGI implementations for IIS, this one really works. It load-balances requests across multiple threads (just like CGI does), and properly recycles them when threads end (just like CGI doesn’t).

Most importantly, it’s fast, lite, & trouble-free. Only time can tell, but this does seem like the real McCoy, if you will. For the past 2 days NST has been available only off-and-on thanks to Slashdot (linking to this story) – and PHP’s ISAPI extension just can’t handle all those requests, and needed a reset every hour. We’ve just switched to FastCGI for IIS, and so far, so good!

Besides just the facts and resources currently sitting on our server, FastCGI for IIS spews good “vibes” all over the place. It’s nothing tangible, and we obviously won’t have any numbers until the next Slashdot effect comes in, but we’re going to go ahead and advise that anyone frustrated with PHP’s lack of stability and uptime on Windows servers (and IIS in particular) should switch right away.

It’s really sad that PHP ignores a huge portion of the market. Sure, Linux is a great server product, and Apache really is wonderful (after all, Microsoft has admitted to using Apache’s modular structure as their inspiration for IIS 7!) – but IIS 6 (and 7 too) are decent web servers in their own right. It doesn’t make sense that they should serve Perl, Python, and ASP.NET 2.0 so well, and just stumble head-over-heels when it comes to PHP.2

  1. Currently, NeoSmart Technologies is running off of a dedicated host (from LunarPages) with eAccelerator, MySQL, WP Cache, and some more optimization goodiness. 

  2. Some of the guys behind NeoSmart Technologies are currently working on a Web 2.0 startup, and it sure as hell won’t be using PHP! 

  • Similar Posts

    Craving more? Here are some posts a vector similarity search turns up as being relevant or similar from our catalog you might also enjoy.
    1. How To: Open Source + Windows + IIS... with Stability
    2. FastCGI for IIS Final Released, Congratulations to the IIS Team!
    3. 20 Hours of Downtime
    4. Microsoft FastCGI Updated - But Should You Upgrade?
    5. eAccelerator PHP Extension Isn't Thread-Safe…
  • 4 thoughts on “No More Downtime!

    1. lol, you took the thoughts out of our heads!

      Phalanger seems to be also much faster, since it’s all precompiled (and deployed) PHP, but the only thing we’re not clear on is just which version of PHP it matches up with. Does you have any idea if it has PHP5 functions? PHP 5.2 PDO functions?

      We’ll probably end up switching to it even if it doesn’t – should this fail to do the trick.

      Thanks, MikusR…

    2. Well, it’s nice to hear that NeoSmart will be up a lot more than it used to be, but to be honest with you, I’m looking at the page load times below, and they’re a lot worse than they used to be.

      I know you guys had a crazy amount of queries per article (something like 95 if I’m not mistaken), but it used to load in

    Leave a Reply

    Your email address will not be published. Required fields are marked *