It sounds like you really need to fine-tune a few things. Depending on how you use Moodle and your number of concurrent users, you'll want to tune:
- Your maximum PHP script execution time.
- Your maximum PHP script memory usage.
- The number of processes Apache is starting (this is an art and a science, and depends on the memory your system has). Don't forget MaxSpareServers, MinSpareServers and StartServers too!
- Your max_connections in MySQL (the total number of MySQL threads dealing with requests)
- Your thread_cache in MySQL (the number of processes MySQL keeps around even if it's doing nothing)