Each server in a web site must be configured appropriately. For example, consider the MySQL problem you've been facing.
A MySQL server spawns a thread for each incoming connection to the database. Out of the box, 100 connections are allowed, with a timeout of 8 hours each.
One persistent connection is established for each Apache child process
the first time that the database connect is called in the lifetime of
that process. When the process is killed, the persistent connection
should be ended. However this may not happen.
MySQL solution: Reduce the timeout period at the server so that disconnects are automatic for clients that are idle from the MySQL server point of view.
Reference: http://www.faqts.com/knowledge_base/view.phtml/aid/230/fid/12
http://www.php.net/manual/en/function.mysql-pconnect.php
Incidentally, the second reference indicate that MySQL can scale up to at least 600 queries per second.
Specifically, for the second project:
Code for generating displays is mixed with HTML output code. This reduces modularity and makes developing multiple alternative interfaces difficult. On the other hand prototyping is easy.
ColdFusion has fail-over and load-balancing. PHP has compilation to byte-code. Other performance features include caching. Scalability tends to be under-estimated.
Typically do not have multithreading, Java support. Typically
do have ability to invoke other servers, e.g. via CORBA (common object
request broker architecture), SOAP (simple object access protocol), and
HTTP.
The platforms provide
New modules of code can encapsulate existing databases and other servers. Different modules can provide different displays. EJBs have three main types: session beans, entity beans, and message-driven beans.
The importance of Java may decline because Sun and Microsoft both support SOAP and XML.
Peak performance: 4000 users at 177 pages per second on six servers: two
web, three appl;ication, one Oracle.