Focal Point
Help for Agent in an Infinite Loop

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7961008082

April 17, 2008, 04:03 AM
hammo1j
Help for Agent in an Infinite Loop
Hi

I had a problem yesterday where an agent was not crashing but going into an infinite loop.

The problem manifests itself where you wait forever for the output to return.

On the server the agent will show with constant statistics since it never breaks out of the loop to update the statistics. The irony is that the looping agent may have low CPU usage statistics if it went into a loop early in its life.

You will have to go to Task Manager to spot the problem. The agent will be peaking on 99% or 50% if you have 2 processors or 33% if you have 3 etc etc.

The request to stop the offending agent from the server console will work but takes longer than ususal.

This type of problem may be more serious than a crashed agent because the agent is taking resources from your server. A user might not get results so they will re-run the report and with many agents running in tight loops this might kill your machine. You are more likely to get these problems occuring as a developer hence the importance of having a separate machine if possible.

The problem seems to occur mainly with PDF output and I have seen an agent looping on its second run of a report (even though an agent is not meant to retain state from report runs).

The key is to retain a history of changes and undo to the point where the report starts working again.

In my case the problem was the line

ON CATEGORY SUB-TOTAL NEW_QTY NEW_COST AS 'Sub Total'


Funnily SUB-TOTAL seems to cause agent crashes in OLAP as well.

This is not to say SUB-TOTAL does not work - it is just a pointer to why you might get infinite loops which is what the idea of this topic is.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
April 17, 2008, 05:03 AM
hammo1j
This is defo something to do with SUB-TOTAL SUBTOTAL RECOMPUTE and PDF etc since it either infinite loops or agent crashes.

We are going to have to go ON TABLE SUBFOOT to get our totals!



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
April 17, 2008, 01:32 PM
Tony A
John,

Normal infinite loop problems on the release you show are down to duplicate labels. Have you checked for these?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
April 17, 2008, 01:39 PM
Francis Mariani
quote:
ON CATEGORY SUB-TOTAL NEW_QTY NEW_COST AS 'Sub Total'


A shot in the dark, but have you tried incorporating the SUB-TOTAL into the BY statement rather than having a separate ON statement?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
April 18, 2008, 12:59 PM
hammo1j
Yes I tried this, but to no avail. I tried just about all alternatives but in the end it becomes a subhead with POSITION= formatting. It is definitely a PDF thing since HTML works ok.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo