recently upgraded server to php 5.6.5 and mysql 5.6.22. running drupal 7.
after the upgrade we started having issues.
the server seems to run well for a week or so before starting to throw error pages with:
Notice: PDO::__construct(): send of 128 bytes failed with errno=32 Broken pipe in DatabaseConnection->__construct() (line 307 of /path/to/site/includes/database/database.inc).
Notice: PDO::__construct(): send of 128 bytes failed with errno=32 Broken pipe in DatabaseConnection->__construct() (line 307 of /path/to/site/includes/database/database.inc).
Notice: PDO::__construct(): send of 128 bytes failed with errno=32 Broken pipe in DatabaseConnection->__construct() (line 307 of /path/to/site/includes/database/database.inc).
Notice: PDO::__construct(): send of 128 bytes failed with errno=32 Broken pipe in DatabaseConnection->__construct() (line 307 of /path/to/site/includes/database/database.inc).
Warning: Cannot modify header information - headers already sent by (output started at /path/to/site/includes/database/database.inc:307) in drupal_send_headers() (line 1233 of /path/to/site/includes/bootstrap.inc).
PDOException: SQLSTATE[HY000] [2006] MySQL server has gone away in lock_may_be_available() (line 167 of /path/to/site/includes/lock.inc).
Notice: PDO::__construct(): send of 128 bytes failed with errno=32 Broken pipe in DatabaseConnection->__construct() (line 307 of /path/to/site/includes/database/database.inc).
when this happens, not every page shows the error, more like 25% or so.
so far i have had no luck tracking down the cause of the error. it seems to 'reset' if i stop/start mysql. such that if i stop/start i can get another week of no problems and then it begins again. this was making me think that it is a problem with a mysql setting related to connections or something, but i am no expert in this area and so am asking here.
after googling and seeing many posts suggesting to increase 'max_allowed_packets', we tried this but still the same issue occurs.