What is maximum query size for mysql? Some times the server stops working when I fire a too long query.
You can check your current server setting with:
SHOW VARIABLES LIKE 'max_allowed_packet';
This gives you the answer in bytes. for e.g max_allowed_packet=1048576
or 1 MiB