AST_VDauto_dial.pl keeps getting dropped by mysql..

On my database server in /var/log/syslog i keep getting errors like this
Apr 21 14:40:25 capone mysqld[32735]: 080421 14:40:25 [Warning] Aborted connection 17451963 to db: 'asterisk' user: 'cron' host: 'asterisknode2 (Got an error reading communication packets)
I found out that its caused by this script on all asterisk nodes: /local_home/asterisk/AST_VDauto_dial.pl
This script connects to mysql and goes into a endless loop like its suppose to be. What happens is that after x mount of time mysql times out on it which causes a major issue in the entire system.. Im not sure if its a mysql setting that has to be changed or what but this is a major issue with the system.
Apr 21 14:40:25 capone mysqld[32735]: 080421 14:40:25 [Warning] Aborted connection 17451963 to db: 'asterisk' user: 'cron' host: 'asterisknode2 (Got an error reading communication packets)
I found out that its caused by this script on all asterisk nodes: /local_home/asterisk/AST_VDauto_dial.pl
This script connects to mysql and goes into a endless loop like its suppose to be. What happens is that after x mount of time mysql times out on it which causes a major issue in the entire system.. Im not sure if its a mysql setting that has to be changed or what but this is a major issue with the system.