I tried your two recommendations but they unfortunately didn't work. I:
1. recreated the indexes for the tables being queried
2. added 'enableQueryTimeout=true' to the JDBC_URL setting in web.xml
I enabled slow query logging with MySQL and found this to be (at least one of) the slow queries:
SELECT `time_id` , `call_id` , `queue` , `agent` , `verb` , `data1` , `data2` , `data3` , `data4` , `data5` , `unique_row_count` FROM queue_log WHERE `partition` ='P001' AND (`time_id` >= '1325433600' AND `time_id`<= '1357672768' ) AND `queue` IN ( '', 'NONE' , 'q-301' , '3000' , '3012' , '3011' , '3010' , 'none' , '3003' , '3200' , '3009' , 'q-300' , '3008' ) ORDER BY `time_id` ASC , `unique_row_count` ASC;
If I run this command from the MySQL CLI client, it completes after about 25-30 seconds. When I run the custom report, it dies consistently after about 37 seconds.
In case it is of any use, here is our JDBC_URL value:
jdbc:mysql://localhost/queuemetrics?sessionVariables=sql_mode=''&autoReconnect=true&zeroDateTimeBehavior=convertToNull&jdbcCompliantTruncation=false&user=queuemetrics&password=[removed]&socketTimeout=0&enableQueryTimeouts=false
What else can we try to remedy this issue? Thanks.