This error occurs when you have a rogue program (or programer) NOT closing connections when they are done with them or not freeing connection objects before a script or program terminates. Or it could just be the server is getting blitzed with requests and cannot cope.
If the server is getting blitzed with too many concurrent requests then relevant setting in the server needs adjusting and the server restarting, or the load on the server needs rebalancing (either beef up the server and or split the workload onto other servers ) talk to you ISP or whoever provides the server (s)
Its unusual to be caused inside a PHP application as PHP is supposed to clear up such things automatically, but Id suggest its good practice to always close objects yourself just in case something slips through in someone else's code.
When I have hit this problem before its always been a rogue program in another language thats done the dirty deed, but the PHP script reports the error when it tries to secure the resources it needs. It is possible inside a PHP script to trigger this if say you create a connection inside a loop so essentially the same connection gets created on each iteration of the loop, which is bad bad design.
Lastly consider if you should be using connection pooling
I'd rather be riding on the Tiger 800 or the Norton