General error: 2006 MySQL server has gone away
Shared hosting companies do not give away the SUPER privilege. If you have it, you can easily set max_allowed_packet  to 512M by just running this :

mysql&gt; SET GLOBAL max_allowed_packet = 1024 * 1024 * 512;


No restart is required. Then, all incoming connections thereafter can have a 512M packet.

You cannot do this:

mysql&gt; SET max_allowed_packet = 1024 * 1024 * 512;


because you get

ERROR 1621 (HY000): SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value


The only alternative I can think of is to switch to Amazon EC2 and install MySQL there. That way, you can have free rein to edit my.cnf/my.ini and have the SUPER privilege.