Flow-control might not be an ideal solution, since the ultimate problem is not
the server being incapable of supporting the network traffic, but rather,
extensive use of database engine exhausts system resources.
Flow-control is usually used by ISP (supporting virtual domain hosting) on per IP
address basis, so theoretically it shouldn't be part of webserver software. And
the session-based flow-control as mentioned (I don't know if such thing ever exists)
is very difficult to implement, since http is basically a stateless protocol, each
URL request is a unique session to the webserver.
A would-be solution might be reducing the max process limit of httpd
(edit httpd.conf) to a suitable value such that even if all httpd processes
are busy querying the database, the system will still be functioning.
Of course, this will only safeguard the proper functioning of the server,
all subsequent requests from other users might have difficulties connecting
to server.