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

Hi,



What type of field is the Location.FSM? Is it a string or reference type of field?



How much data is in the cmdb_ci table?



Could the sys_class_name value be added to the query, i.e. do the two values in the screenshot have the same sys_class_name? In same cases this could give better performance to the query, if your CMDB is very large.



For the "Incident state" I prefer to to use "is one of"-option and then select the values you wish to include in the search.



If you use the "is not one of"-option, you tend to trigger a full table scan. And the Closed-value is already overlooked with the Active = true statement.



Place the Incident state -query as second after the Active = true statement. Followed with the CI statements and lastly add the location reference queries.



Is there any change to the performance? You are doing a Group by Location -grouping also, which will have some impact to the overall performance of the report. Notice any difference if you leave out (just for testing)?



- Jan


Hi Jan,



FSM is a reference field back to the sys_user table.



There are 290000 "base items" in the cmdb, which to my understanding is the cmdb_ci table. We are only searching within Business Services when it comes to our incidents, however - can we just query those using sys_class_name = Business Service?



I will test the other recommendations tomorrow and get back to you, thanks once again for your help!



Sean


Any updates ?



Thanks,