Bug #61837 Packets larger than max_allowed_packet are not allowed
Submitted: 12 Jul 2011 16:50 Modified: 1 Aug 2011 19:37
Reporter: M B Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:6.4.3 OS:Windows (Windows Server Datacenter 32bit)
Assigned to: Julio Casal CPU Architecture:Any
Tags: cache server properties, max_allowed_packet

[12 Jul 2011 16:50] M B
Description:
We just updated Connector/Net from 6.3.6 to 6.4.3 in order to leverage new parameter Cache Server Properties (which in the documentation is described as Cache Server Configuration). Local, limited testing under light load seemed to work fine. However, after deployment to production we started getting the following error:

 ---> MySql.Data.MySqlClient.MySqlException: Packets larger than max_allowed_packet are not allowed.
   at MySql.Data.MySqlClient.MySqlStream.SendPacket(MySqlPacket packet)
   at MySql.Data.MySqlClient.NativeDriver.ExecutePacket(MySqlPacket packetToExecute)
   at MySql.Data.MySqlClient.NativeDriver.SendQuery(MySqlPacket queryPacket)
   at MySql.Data.MySqlClient.Driver.SendQuery(MySqlPacket p)
   at MySql.Data.MySqlClient.Statement.ExecuteNext()
   at MySql.Data.MySqlClient.PreparableStatement.ExecuteNext()
   at MySql.Data.MySqlClient.PreparableStatement.Execute()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()

When we remove Cache Server Properties from connection string, all works as expected. Our connection string is:

server=localhost;port=3306;User Id=user;password=password;database=database;charset=utf8;Pooling=true;Max Pool Size=75;Cache Server Properties=true;

Our server is on Amazon RDS 5.1.45-log MySQL Community Server (GPL).

How to repeat:
It seems that after sufficient load/connection requests and only with Cache Server Properties=true this bug shows up.
[1 Aug 2011 19:38] Julio Casal
Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.mysql.com/how-to-report.php

Please provide a small database schema and Visual Studio project where this error consistently appear.

If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.
[26 Aug 2014 11:34] Chris Hewitt
This still occurs within MySql.Data Connector/Net 6.8.3

My case involves an ASP.Net 4.0 WebForms project, NHibernate 3.3.3 & CacheServerProperties=true.

When this is removed (CacheServerProperties), no further issues occur.

Will attempt to create a test case / scenario.