Do these "sleeping" connections happen because mysql_close () is not used at the end of the scripts?
No. MySQL connections are anyway closed at the end of the script, unless they are persistent.
, , , - MySQL , PHP script - .
, , . , , , , . , , , , , , , , ..