Sometimes (when I run cron manually) I receive an error like below;

Warning: MySQL server has gone away query: SELECT * FROM system WHERE type = 'theme' in /home/content/xx/html/includes/database.mysql.inc on line 172

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', 'Lost connection to MySQL server during query\nquery: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'gsitemap', 'Site map successfully submitted to Ask.com.', 0, '', 'http://xx.com/admin/logs/status/run-cron', 'http://xx/admin/logs/status', 'xxx.xx.131.169', xxxx799501) in /home/content/xx/html/includes/database.mysql.inc on line 172.', 2, '', 'http://xxx.com/admin/logs/status/run-cron', 'http://com-x2.com/admin/logs/status', 'xx.xxx.131.169', xxxx799501) in /home/content/xx/html/includes/database.mysql.inc on line 172

This is a sample of the error message. It can change. But I always see that "includes/database.mysql.inc on line 172" doesn't change. Recently I saw a similar error when delete a block.

What does it mean line 172? I also suspect this problem causes not to track the clicks/IPs on Adsense module.
Note: I changed some private data on the sample error above with "xx,xxx,xxx" while I copy-paste. I will let you login to the necessary accounts to solve the problem.

I use Drupal version 5.7 which has been upgraded 2 times.