Long Time Running App, Encounter The [2006, "mysql Server Has Gone Away" ] Error

i use gearman for job handling !

a yii console app as gearman worker , often encounter the

> 2006, "MySQL server has gone away"

errors . so i google it and found some articles about this error , a better one is this https://github.com/laravel/laravel/issues/1534

it seems that pdo do not have reconnect method , we must manually destroy the old one and reinitialize a new one .this may cause some strange results when using the transaction !

want to know how you guys settle this situation !