Hari KT's post in Mysql Server Has Gone Away' was marked as the answer
I have send a PR https://github.com/ryancramerdesign/ProcessWire/pull/366 which will fix this.
This have been run and is working fine.
Edit : If you are running on an older ones have a look into http://zaemis.blogspot.in/2014/02/fixing-mysql-server-has-gone-away.html post . That will help you to set the flag. But not for PDO.