As convenient as it is to drive pages with cgi scripts, I had to partially give up on that because this shared web server just couldn't handle all the forks. That's not the fault of the hosting company; it's just that I've been getting too much traffic now and then. So today I began converting some pages to static pages - no dynamic content except for the ads.
Of course I didn't do this manually - I wrote Perl scripts to handle the work. However, I did it partially manually because I wanted to take this opportunity to update meta tags where needed. The scripts I wrote would show me the current tags and give me the choice of editing them or just doing the conversion. I spent a few hours on this and converted 77 files to static pages.
Just 77 out of more than 13,000? How's that going to help? It will help more than you might think: those 77 pages accounted for more than half of all traffic here last month. Just converting those will cut the number of cgi-bin forks in half. I can actually see that instantly in "w" - I haven't seen such low load averages in years!
This conversion does mean that I had to give up on the fly counting of page views.. that's not so important. I like to know that information, but it's not critical. I can live without it. Other than that, everything should look pretty much the same and will load faster when we're getting pounded on a little. That's worth the effort. I'll slowly convert other pages as I have some other reason to edit them.. I'll probably never get to 100% static but I don't need to right now anyway.
So this gives me some breathing room - we can grow a little bit more before I have to move off shared hosting.
If you found something useful today, please consider a small donation.
Got something to add? Send me email.
More Articles by Anthony Lawrence © 2012-08-04 Anthony Lawrence
[This] reminds me of a quotation from somebody that, whenever he tried to explain the logical structure of a programming language to a programmer, it was like a cat trying to explain to a fish what it feels like to be wet. (Saul Gorn)