Homepage widget times out with error "Widget cancelled - maximum execution time exceeded"

mansfis
Giga Contributor

Hi all,

Apologies for re-raising but I tacked this onto the bottom of a previous post and no one responded. None of my widgets (11 reports in total) take longer than a second to run, but one still returns the maximum execution time error. The report is relatively simple (runs against incident and references the location and user tables) and runs between 800-1200ms on its own. However, in the context of some users (all in the same groups), it appears to continually rerun until hitting the 30sec mark and thus timing out (you can see this in the SQL debugger - each time it runs, it takes the runtime as above, but appears to run approx 30 times each time the homepage is loaded). When I run the report (which returns zero results) it also appears to run multiple times, but only takes 20-30ms and runs perhaps 7 times before the page fully loads.

Does anyone know what the possible cause of the reruns would be, and why it would differ between myself and others? In the SQL debugger, the other users appear to be running SELECTs against ACLs but not against my account. Could a mismatch or conflict of ACLs be causing this? Or is it simply that there are many results when other users run the query, and none when I do?

Please let me know if you'd like any additional information or examples of the logs.

Regards,

Sean

7 REPLIES 7

JC Moller
Giga Sage

Hi,



Could it be an issue with the report itself? How is the reference to the location and user table done? Is your incident part of the report starting with the Active = true statement (for optimal performance)? Are the any dynamic references in the report?



If you run the report with a minimal scope, one named user, his/her location and his/her incidents, do you get a result?



- Jan


Hi Jan,



Thanks to your advice, setting Active = true has made the report quick enough to no longer create a timeout, but it is still slow (~16 seconds). Would you mind assisting to try and make this quicker if possible?



The user table references the location table, as in it looks for the current user's manager in the User table and searches for Locations where the user's manager is in the Location's "FSM" field. I think this is what you mean by dynamic references?



The report runs fine if I run against one location, or one FSM. Is it the dynamic references causing the slowdown?


Hi,



Could you provide a screenshot of the report itself (the query builder)? I am interested to see how the grouping and the query itself is set up.



How much data is there in the sys_user and cmn_location tables?



The Location (cmn_location) table has the following columns indexed:


parent


contact


phone_territory


name


sys_id


company



Is any one of these used in the report / can any one be used?



- Jan


Hi Jan,



Here is the report:



find_real_file.png



The Location.FSM should read = javascript:gs.getUserID() OR = javascript:gs.getUser().getManagerID().



There are 155 rows in the cmn_location table, and 12000 in the sys_user table. I'm not sure any of the columns you mention are appropriate in this case, but perhaps manager would?



Thanks again,



Sean