MySQL server has gone away

I get this error maybe every couple of weeks. It seems to last less than a second, as the error is fired only by one or two script instances (pages hits), but is fired for each query on the page. There doesn’t seem to be any pattern as to the script or queries that the server goes away for, but the queries are usually very small inserts and selects.

I’m running php 5 and mysql 5.0.77. The site is on a dedicated server. It’s a fairly powerful machine but the site is getting more and more busy.

What can cause this problem? Is it perhaps something to do with the number of connections on the server? Any settings I should change? I’m using non-persistent connections.

Any ideas?

Have you seen

http://dev.mysql.com/doc/refman/5.0/en/gone-away.html

for a wealth of ideas.