I'm assuming/hoping that this is a known issue with a logical resolution (aren't we all?).
I have a web app that loads large forms or dynamic php pages based on queries to MySQL. The amount of data that is loaded can be quite large and can involve numerous queries and sometimes loops of two to five iterations. Sometimes the form (and therefore the page in the browser) loads with incomplete data - the page might end prematurely - it might be truncated before the end.
It would appear that the connection was slow and the query wasn't finished or that the page was loaded before all of the data was processed and loaded. And it doesn't happen consistently.
Is this common? Is it a server issue? Can I code around it? Does my host need to tweak something in MySQL or PHP or Apache? Or do I just need to chop the page into separate sections on separate pages (a less that ideal solution).
I think your PHP script has got timed out, due to complex queries. The default timeout time is 30 sec (Unless u change it). So to solve this issue, you can either increase the timeout time (in the PHP.INI file) or split the queries to be run on two different pages.
Hope this helps. Do let me know whether this solved your problem