Use cache. When someone requests your page, simply check if the database changed since the previous hit - if not, then show him cache you generated.
Um, that doesn't seem simple to me. How exactly would you implement this simply? How do you check if the database has changed without querying the database again?
Apparently thebench.org has tasted the slashdot effect, as I received these errors when I tried to connect:
Warning: MySQL Connection Failed: Too many connections in php_header.php3 on line 10 Warning: MySQL Connection Failed: Too many connections in/web/sites/www.thebench.org/htdocs/index.php3 on line 81
Warning: MySQL: A link to the server could not be established in/web/sites/www.thebench.org/htdocs/index.php3 on line 81 Warning: MySQL Connection Failed: Too many connections in/web/sites/www.thebench.org/htdocs/index.php3 on line 88 Warning: MySQL: A link to the server could not be established in/web/sites/www.thebench.org/htdocs/index.php3 on line 88 Warning: MySQL Connection Failed: Too many connections in/web/sites/www.thebench.org/htdocs/index.php3 on line 93 Warning: MySQL: A link to the server could not be established in/web/sites/www.thebench.org/htdocs/index.php3 on line 93
Actually that kind of worries me, as I'm about to build a big site using MySQL and PHP3. The MySQL crash-me page shows both MySQL 3.23.8-beta and 3.22.29 as having a 101 connection limit, which seems rather low. Surprisingly, it shows Oracle 8.0.5.0.0 allowing only 40 simul connects.
With persistent connections enabled these limits don't seem too difficult to reach. Ugh.
Ahem, but most of us already have DORK tatooed on our foreheads. Not me, of course. Javier (Can't wait for Ronnie Dobbs the Movie!)
Um, that doesn't seem simple to me. How exactly would you implement this simply? How do you check if the database has changed without querying the database again?
With persistent connections enabled these limits don't seem too difficult to reach. Ugh.
javier