in reply to mySQL Times Out / Disconnects

In addition to program-generated diagnostic messages, you may also want to look at the MYSQL database log.

In my case, on a Win32 system, in a situation similar to yours, where I was regularly appending records to a DB, and getting errors every few hours, the problem was related to McAfee Antivirus scanning the DB file area.

After I prevented McAfee from accessing the DB storage area, the errors went away.

     "As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom