time limit exceeded for aggregate models

Recently I’ve sometimes have seen the error message “Time Limit exceeded” show up for som pages. Usually after a reload or just wait some time it goes away. However for a couple of pages this message seems to appear more frequently and I’m about to release some of these pages to users and the beta-testers also get this error now and then. Before going into production I would like to solve this.  The common thin k between pages where this appears seems to be that they have aggregate models. One of the pages that gets this the most has a Queue where I use the aggregate model to get distinct values from a custom object.

The object contains workorders and the queue should only show areas where the person using the page has worked. With regular SQL I would have uses Select Distinct for this but with Skuid I have found that grouping an aggreate model can be used to get the same result. However what is strange is that the page usually loads really fast but sometimes seems to hang for a while and then displays the “Time Limit Exceeded” message. Any suggestion on how I can troubleshoot this?

Intermittent issues.  Ugh.  

Peter, nothing immediately comes to mind.  Is there any other factors you can identify that might help explain occasional success/failure?  Does it fail on first load, but succeed on second (Caching).  Does it fail on big requests but succeed on smaller ones?