MySQL SQL STATE[HY000] [1203] User XXXXX already has more than 'max_user_connections' active connections
<p>I noticed that my return value from $STH->fetch(PDO::FETCH_ASSOC) is:</p>

<p><code>SQLSTATE[HY000] [1203] User *USERNAMEHERE* already has more than 'max_user_connections' active connections</code></p>

<p>All my queries are successful and everything seems to be working fine.</p>

<p>I thought I was properly closing the connections by assigning it NULL. Here is my function, any ideas why I'm maxing out?</p>

<pre><code>function mysql_read_single_row($sql, $array_of_values) {

    try {
        //create a connection
        $DBH = new PDO("mysql:host=".CONST_MYSQL_HOST.";dbname=".CONST_MYSQL_DBNAME, CONST_MYSQL_RUSER, CONST_MYSQL_RPASS);

        //set the sql
        $STH = $DBH-&gt;prepare($sql);

        //execute query
        $STH-&gt;execute($array_of_values);  
    }
    catch(PDOException $e) {
        echo $e-&gt;getMessage();
        return false;
    }

    $return_row = $STH-&gt;fetch(PDO::FETCH_ASSOC);

    //close the connection
    $STH = null;
    $DBH = null;

    //strip any escaped quotes from the data
    $return_row = array_map('stripslashes', $return_row);

    //return the array
    return $return_row;
}
</code></pre>

<p>Is setting $STH and $DBH to null not sufficient to prevent this error?</p>