Yii Framework Forum: mySQL max_allowed_packet - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

mySQL max_allowed_packet Rate Topic: -----

#1 User is offline   mh469 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 56
  • Joined: 10-October 09

Posted 13 March 2010 - 03:31 AM

Hi!

I just got the following mySQL error with a large blob: Communication link failure: 1153 Got a packet bigger than 'max_allowed_packet'

Assuming, I cannot change the mySQL configuration, is there any way to make this whole thing work with Yii? A Yii option maybe?

Thanks
0

#2 User is offline   vamp 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 181
  • Joined: 30-January 09

Posted 13 March 2010 - 05:25 AM

View Postmh469, on 13 March 2010 - 03:31 AM, said:

Hi!

I just got the following mySQL error with a large blob: Communication link failure: 1153 Got a packet bigger than 'max_allowed_packet'

Assuming, I cannot change the mySQL configuration, is there any way to make this whole thing work with Yii? A Yii option maybe?

Thanks


try to use:

'db'=>array(
   ...
   'initSQLs' => array(
      'set global max_allowed_packet = 1500000', // 1500000 - your value (if you have permissions to change this value - it helps)
   ),
),


in your main.php ('components' section)
-Posted Image-
Thanks, you make me stronger!
0

#3 User is offline   mh469 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 56
  • Joined: 10-October 09

Posted 13 March 2010 - 11:09 AM

Thanks. I get, however, an error message that CDbConnection.initSQLs was not defined. The documentation agrees with that.
0

#4 User is offline   Y!! 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 978
  • Joined: 18-June 09

Posted 13 March 2010 - 12:25 PM

View Postmh469, on 13 March 2010 - 11:09 AM, said:

Thanks. I get, however, an error message that CDbConnection.initSQLs was not defined. The documentation agrees with that.


If you want to try that out, you have to use the latest unreleased yii version from svn.
0

#5 User is offline   mh469 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 56
  • Joined: 10-October 09

Posted 14 March 2010 - 12:49 PM

Thanks. The newest stable release (released today) does know this parameter. (However, I don't need it any more. In the meantime, I found out that the oversized data came from wrong export data. An image (included in XML) was of the wrong format.)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users