View Full Version : Slow Forum - PHP to blame?
David
17th Dec 2003, 09:42 am
I imagine that like me, you have been experiencing slow responses from this forum recently and have been subject to the dreaded "Fatal error: Maximum execution time of 30 seconds exceeded...". At first I thought it was just at peak times when the server was busy. However, the problem seems to lie in another direction.
The forum uses the PHP scripting language to do all its stuff. PHP is an open source language, originally designed to run on the Unix/Linux operating system. This forum runs on a Windows 2003 server and I wondered if that was part of the problem. I now have a copy of the forum running on another domain, this time hosted on a Red Hat Linux server and I'm currently running some comparative tests. Initially, my suspicion appears to be correct. The Linux hosted forum is running at least 3 times faster than this one at the moment. I'm going to monitor the two over the next week or so for a more definitive result. However, it looks as though I will need to move the Website Architecture site to a Linux server. I'll probably do this over Christmas because it will cause some disruption. Any comments welcome.
This topic relates to the old forum
francis
17th Dec 2003, 06:17 pm
I'd noticed this, but just assumed it was because of my pauper's 56K dialup connection. It usually happens when I've got a couple of tabs open, each downloading content.
There's a setting in the PHP.ini file (which you won't be able to change, I assume) that sets the maximum execution time for each script. By default it's set to 30 seconds:
max_execution_time = 30 ; Maximum execution time of each script, in seconds
This will be something I assume your hosts will be able to fix/change, although it might be one of those things that affects all of their clients, so maybe they won't.
David
18th Dec 2003, 09:39 am
Speed of connection is definately a factor but to be honest, the difference in delivery speed between the Windows and Linux servers is so profound that I think that seems to be the primary issue.
The max_execution_time setting is non-negotiable. This is understandable. Of course I could buy dedicated server hosting and then set it to whatever I wanted but the cost is prohibitive.
francis
18th Dec 2003, 09:21 pm
Maybe it's the way the hosts have set up PHP on the Windows box? It's not something I know much about - I've got an install of PHP 4.3.4 with a few extensions installed running locally on an install of Apache on my XP Pro machine at home, but that's about the sum total of my knowledge.
I know that for PHP on IIS there's a script that will configure the server to run PHP for you, but I'd assume that the hosts will have done their own setup.
Out of interest, why did you go for a host running Windows if you wanted PHP?
David
19th Dec 2003, 10:56 am
Ah well, hindsight is a great thing. I have a reseller account with Fasthosts. This enables me to set-up and administer domains, POP mailboxes etc. It's a great system and I've been running it now for about 3 years or more.
When I first set-up the account, I had to choose either a Windows or a Linux account. At the time, the choice seemed simple because I was only dealing with HTML. Windows meant not having to worry about ascii/binary or CHMOD or even upper/lower case filenames. So I went for Windows. Naturally, I wouldn't make the same decision now. However, the Fasthosts account now allows me to move domains over to Linux servers but at a small extra cost.
It's amazing how things change. 3 years ago I'd probably never heard of PHP and now it's what everyone wants/needs.
In the not-to-distant future, I'm planning an upgrade to the CADTutor.net site and I'm currently looking at MovableType (http://www.movabletype.org/) (Perl MySQL) and PHP-Nuke (http://phpnuke.org/) (PHP MySQL) as content management options. There are probably other options to consider as well. But basically, all this (free) stuff runs better on Linux and given the choice again I'd always go for Linux hosting.
francis
19th Dec 2003, 12:56 pm
I've got an account with Fasthosts, but will be moving when it expires. They want £50 (I think) to enable MySQL. Yeah, right. There's pleny of good hosts out there, and with the favorable exchange rate, I'll probably look to the US, Canada or elsewhere.
Perl is something I really want to look at, but don't know where to begin. I like the idea of running small, powerfull programs that only consist of about 3 lines of code. I've been playing with regular expressions for a while now (O'Reilly's Mastering Regular Expressions is a great book), but there's only so far you can go under Windows (I believe)
David
19th Dec 2003, 02:32 pm
I must admit, Fasthosts have been pretty good, despite some bad press on the forums but the cost of databases is stupid. I have the CADTutorForum.net site with SupaNames (http://www.supanames.co.uk/) who include PHP and one MySQL database with the standard package (less than half the price of a single database at Fasthosts). Great value and so far no hassle - the forum runs well and has been doing so for over a year.
You're probably right to look abroad for hosting. If I didn't have so many domains at Fasthosts I'd probably move too but the thought of all those transfers makes my toes curl. :(
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.