CORRECTION:Actually the problem was not that the agent Print’ed too much. It was logging too much to the Agent log, which has a known & documented 64K cumulative limit.
The hint: the log ends in mid-entry with a bad character.
At least this proves that there is no 64K cumulative limit on the amount an agent prints.
Original Post:
===============================================
My LotusScript agent does FTSearch, and then Print’s lots of HTML. It runs in response to a JavaScript submit() of an HTML form for which the Action in an URL is
…?OpenAgent&Query…
It first prints a Content-type header so that the HTML goes to Excel. (This successfully leads to creation of an Excel spreadsheet, see many other posts.)
This works great when the search has 200 documents in the result. But with 300 documents, it throws the error into the server log:
HTTP Web Server: Lotus Notes Exception - Memory allocation request exceeded 65,000 bytes [/myDB.nsf/myAgent?OpenAgent&…restOfMyURL…]
The user gets the “Error 500 Internal error” screen, and no Excel file.
Perhaps the Print-out is being stored in a buffer that grows too large? Perhaps this buffer could be enhanced? Is there some way to “flush” and continue?
I know that the LS agent processes one document at a time, then Print’s the HTML for that doc, then loops to the next doc. It does not store up any data, so none of its variables are growing past 64K.
Of course the NotesDocumentCollection from FTSearch grows, but the agent isn’t bombing at that point in the code. It bombs during the loop that does the Print’ing.
Any suggestions are welcome!