ded while you're doing some heavy PHP lifting (processing an image, for instance), you should consider pinging the server by using the <dfn>reconnect()</dfn> method before sending further queries, which can gracefully keep the connection alive or re-establish it.</p>

<code>$this->db->reconnect();</code>

<h2>Manually closing the Connection</h2>

<p>While CodeIgniter intelligently takes care of closing your database connections, you can explicitly close the connection.</p>

<code>$this->db->close();</code>
