Jump to content


Photo

max_allowed_packet, HELP HELP!


  • Please log in to reply
2 replies to this topic

#1 Chirantha

Chirantha
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 09 April 2006 - 07:44 PM

Hi,

I was learning MySQL, And what! I made a program with it. But the problem is that when ever I put a BIG document (246MB) mysql returns max_allowed_packet exceed error :( . Is it possible to get MySQL to write part by part? and Read Part by Part?

Please Give an example code.

Thank you,
Chirantha

#2 jworisek

jworisek
  • Members
  • PipPipPip
  • Advanced Member
  • 112 posts

Posted 10 April 2006 - 02:22 PM

well, you can try modifying the mysql configuration file and changing the value to

max_allowed_packet = 350M

Why are you storing documents that big and are you sure your column type can support that?


#3 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 10 April 2006 - 03:19 PM

Please tell me you're not serious. Don't even dream about doing that. There's a reason that max_packet_size exists, and you shouldn't tinker with it. Besides, I doubt that PHP can even handle such a large value with any reasonable speed, and you're unlikely to serve such a document to anyone, anywhere, except maybe locally. But I digress... in general, you should break up large files of typical size (MBs) across multiple records, and then simply stream them out one after the other.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users