It sounds like an architectural problem. Why do you need to do thousands of queries at once? Is it some kind of parallelism that will do something good, or you just accidentally made a mistake in DOS (denial of service), some bad suspicious web service / API?
, , , . , , . , . , apachebench, .
PHP - , 90% PHP. , . , 1000 PHP- , . PHP 10-20 , (, .
, . , . , 24 36 ?
, , , . PHP, , , , . , , :
" " - HTTP-, . (. ).
" " - , HTTP-. ,
( ), . Parallelism , - .
, " " - , Parallelism. , , .