2

I have a includeJS variable set that populates a javascript calendar from an entries loop, with a large amount of entries which needs to be cached.

Whenever I cache this section I get this error:

Error while sending QUERY packet. PID=11878

What's the problem here?

  • 3
    cache is useless if the thing you're caching doesn't directly output HTML. Instead of using includeJs, perhaps it makes sense to output a <script> tag, and cache that. – Lindsey D Aug 7 '15 at 17:08
  • When I use the script tag I still get the same QUERY packet error – j00lz Aug 8 '15 at 10:40
  • I've narrowed this down now.... seems there is a limit to the size of a cached object. If I try to cache a loop of 200 entries then it gives me the php warning. Is it possible to up this limit? – j00lz Aug 8 '15 at 10:52
4

So turns out this is to do with the size of the packet being sent to the database cache.

My server had a limit of: max_allowed_packet = 1M

Doubling this solved my problem.

0

I had this error. Changing the allow_max_packet did not work. Turns out it was my general.db file. I have it set up for a multi-environment config. This is what fixed it:

Changing

    '*' => array(
         'defaultImageQuality' => 80,
    ),

to this:

    'defaultImageQuality' => 80,
  • This doesn't make sense? Do you know why the multi-environment config caused it? Have you talked to P&T about it? – Fred Carlsen Nov 10 '16 at 10:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.