Web hosting on Windows II: Of Speed and Stability
Sun 13 Jan 08 00:48 | Tags: Web Hosting, Windows
So at the end of Part I, we were given a Windows 2003 server to host on and told to go nuts -- we could install whatever software we wanted on it, but we couldn't change the OS. Okay, fair enough.
As I mentioned, my first choice for a server was LightTPD. There's a great project called WLMP Project, which provides an installer which MySQL, Lighty and PHP all as a "kit," including their services (the Windows equivalents of daemons). The installer itself is in Hungarian, but it's easy enough to get through; just click the default buttons all the way through.
One problem, though; it configured Lighty to connect to PHP via CGI instead of FastCGI. The difference between these two is beyond the scope of this article, but suffice it to say that the latter is faster, and would also allow me to use the opcode cacher XCache to make things even faster. I tried to reconfigure Lighty to use FastCGI, but as it turns out… FastCGI simply doesn't work on the Windows version of Lighty and apparently never has.
Well, okay. Maybe old CGI without XCache would be good enough. So I tweaked the configuration back to using CGI, and things worked great for the rest of testing period.
Then we went live and Lighty promptly crashed.
Well. We could restart it and it would hold up for a few more hours, chugging along very slowly. The error log was packed with errors like this:
2007-12-30 22:39:13: (connections.c.132) (warning) close: 14 Interrupted system call
2007-12-30 22:39:26: (connections.c.132) (warning) close: 9 Interrupted system call
2007-12-30 22:39:27: (connections.c.132) (warning) close: 9 Interrupted system call
2007-12-30 22:40:37: (connections.c.1205) connection closed: poll() -> ERR 8
2007-12-30 22:40:37: (connections.c.1205) connection closed: poll() -> ERR 9
2007-12-30 22:41:55: (connections.c.1205) connection closed: poll() -> ERR 7
2007-12-30 22:41:56: (mod_cgi.c.1231) cgi died ?
2007-12-30 22:42:25: (connections.c.132) (warning) close: 7 Interrupted system call
2007-12-30 22:43:23: (connections.c.132) (warning) close: 7 Interrupted system call
2007-12-30 22:43:23: (mod_cgi.c.1231) cgi died ?
2007-12-30 22:43:41: (connections.c.132) (warning) close: 8 Interrupted system call
2007-12-30 22:44:26: (connections.c.1205) connection closed: poll() -> ERR 11
2007-12-30 22:44:27: (mod_cgi.c.1231) cgi died ?
I never precisely figured out what the problem was, but seeing as how I had run into incompatibility problems with Lighty and CGI before, I decided at this point that, as much as I loved LightTPD, it was just never meant to run on Windows. Time to look for alternatives.
Now, the obvious alternative was Apache. I shied away from it at first, though, because I hate Apache's confusing configuration files -- the illegitimate child of XML and that kind of meth which makes you think you can take a cop who has a gun drawn and pointed at you -- and I needed a crash-resistant server working now. What I ended up with was Abyss. Abyss is a closed-source server with a free and a commercial version; I installed the free one first. Abyss uses a rather pleasant graphical configuration system which is accessed by going to port 9999 on localhost in a web browser. It sounds really Mickey Mouse, but it was actually pretty capable; it connected to PHP via FastCGI with no problems, and it could handle URL rewriting with regular expressions so we could keep the same "pretty URLs" we had set up with Lighty. Most importantly, it never crashed. However, it couldn't handle WebDAV as LightTPD could, so I configured LightTPD to only listen to WebDAV requests through another port and leave port 80 to Abyss. Since LightTPD got a lot less traffic and didn't have to try to connect to PHP in this case, it started behaving itself again and stopped crashing.
So Abyss was stable and faster than the suffering LightTPD, but it still was unacceptably slow at times. Also, since Windows doesn't have Unix/Linux's sendmail, how was PHP going to send outgoing email? There was more work to be done, clearly… But I'll leave that for another day.
Get more great Ray Gun Robot content sent directly to your feed reader or email inbox! Subscribe today!
Articles & Links — Via Email
Articles Only — Via Email
0 Comments | 0 Trackbacks |
| ![]()

