#Increse max packet size (why this doesn't work)

2 messages · Page 1 of 1 (latest)

wispy oriole
#

Error 1105 (HY000): resource_exhausted: grpc: received message larger than max (89200289 vs. 67108864)

untold obsidian
#

On super quick glance..

  • Why not set a constant to hold len(b) instead of reading it twice: const curFileSize := len(b)
  • If you're setting max_allowed_packet for each request, you should use a tx to rollback in case that your insert stmt does fail it won't keep the previously set max_allowed_packet value.
  • I would add some logging to debug: What is the output of fmt.Println("FileSize:", len(b))