Fix issue where too big message data was stored in cache causing sql errors (#1489316)