title: Random MySQL errors?
body: <p>I installed a handy little script on a website. When in localhost, there are never any errors; however, when I am hosting it on my VPS, I occasionally and purely randomly get MySQL errors, and I think it is murdering my traffic. Is this happening because of a bad VPS, or are there other reasons?</p>
  
  <blockquote>
    <p>Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean
    given in
    /home/freetrav/public_html/travian/GameEngine/Database/db_MYSQL.php on
    line 1383</p>
    
    <p>Lost connection to MySQL server during query</p>
    
    <p>Warning: mysql_connect() [function.mysql-connect]: Can't connect to
    local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in
    /home/freetrav/public_html/travian/GameEngine/Database/db_MYSQL.php on
    line 17 Can't connect to local MySQL server through socket
    '/var/lib/mysql/mysql.sock' (2)</p>
    
    <p>MySQL server has gone away</p>
  </blockquote>
  
  <p>All these are purely random and none are permanent. They usually happen when there are many pages open at once, and they log the current account out.</p>