Thanks for your reply. I have attached an example of a very basic script that doesn't work. Unfortunately it's not on a public webserver so I can't show a real example.
If I comment out the one line within the function setQueryLayer() then it works (using the default) query task on every zoom level, it's just it will always use layer 4. This appears to be where the problem happens.
Looking in Firebug, I can see that the POST requests (via the proxy) go from a second or two to milliseconds when the queries start failing, so I don't know if this is significant.
At the highest level, the map that appears has vectors split into the UK government office regions, e.g. "north east", "scotland", "north west". As you zoom down, they split into local authorities etc. Another strange problem I have - maybe related - is that if at the highest level, I click within Scotland to do a 10K buffer search (well within the vector boundaries), it takes 40 seconds to do the POST query and then completely crashes my browser. No idea why!
I should also say this is querying vectors, not point sources (although I want to add a second query task in later down the line to query a point source layer, but that's for later, I need to get this working first!)
I'm new to the JS API, so you may find my code isn't the best!
Thanks for any help you can provide.