The wiki 16 Jan 2005
As many of you know, the wiki has died. I suspect massive memory leaks courtesy of LS2J. Of course, it’s pretty tricky to troubleshoot issues like this on a server which isn’t yours! Occasionally a page will load, but usually the rendering fails, and all the user is left with is the subject of the page in question.
I make use of a Web Query Open agent to create a new WikiPage object in a custom Lotusscript library. This class does all the heavy lifting, including referencing some ORO regexp code in Julian’s excellent script library (see his LS2J examples database). This ran happily for three days before dying yesterday afternoon.
My suspicions of a leak are bolstered by the fact that I get this error message when I try to trigger a test agent (this time pure Java) on the server:
HTTP Web Server: Lotus Notes Exception - JVM: Attempt to retrieve Java agent attachments failed.
I understand that this error can mean that your JVM’s heap size is trashed, which would make sense. The agent logs that Domino Developer Network make available to its users aren’t showing anything untoward, and debug statements in the code are showing no issues… so there we are. Flummoxing. I’ve logged a support call, so we shall see.
In the meantime, my apologies to uses of the Lotusphere wiki. Hopefully normal service will resume soon. You can edit your content as much as you like. You just can’t see it (!)
Perhaps it crashed when I tried to extend the "Party" page with my list ? :-)
Bummer.
---* BillWild Bill#
Just something you could try, if you're allowed. Maybe the problem is just referencing the JAR file as an included/attached file in the script library. I know that sort of thing is supposed to work, but maybe it's buggy on your version of Domino.
- Julian
Julian Robichaux#
I ensure that there’s code to release object references and the like, but the help is rather scant on exactly what needs to be done in this regard with LS2J (as Bill points out, Domino Java needs heaps of recycling (pun intended, sorry), but what about Lotusscript wrappers?)
I may have to check out m’learned colleague’s custom class for LS2J shenanigans. You can see it here:
http://www.swapcode.com/domdoc/page/lscode012.htmlBen Poole#
I've heard the same LS2J issues from Manfred Dillman in development effort of his rss reader.:
[quote]
Version 1.2 | 2004-07-05
* Completely replaced the Java code with LotusScript (Win API calls). There were memory leaks on the agent manager when running the agent on a Domino Server which reappeared with Domino version 6.5.2.
[/quote]
(from: http://www.madicon.de/content/view/39/52/)
If I remember right, he even talked with IBM support in Germany and got no solution. But not sure.
I am highly interested in this issue.
Until now I suspect that the memory leak is buried deep down in closedSource LS2J code, which I don't find funny.
Sun (and other Java stakeholders) should start to think about charging Lotus for image loss of Java. In a german notes forum a lot of people seemed to believe that "java has lots of memory leak problems". I had tried my best to convince them that it was Lotus with LS2J.
Axel
Axel Janssen#
Haven't seen it. This looks like a good workaround. Creates extra burden on the developer, but might make the whole thing work more than 3 days.
But why the hell this is not documented on Lotus/IBM site?!?
Similar gotchas with Workplace if the thing will ever arouse more interest as the 0 interest it has now and they'll get killed on http://www.javablogs.com
AxelAxel Janssen#
To be honest, it’s trivial to re-code the agent to work as a pure Java process, but I like how it looks at the moment, so I shall wait and see. I could really do with some good profiling tools on a server of my own at the moment! :-)
Definitely agree about documentation though: Lotus need to be a lot clearer in this regard, as they do with what counts as “restricted” and “unrestricted” in terms of Java agent security: a very early incarnation of OpenWiki used the gnu regexp classes, but I had to pull all of that and use a Lotusscript parser because the Java code only ran in unrestricted mode (that in itself took a lot of testing to prove, as the Domino box doesn’t give many clues here).Ben Poole#
It still annoys me you have to watch every single domino object you create and recycle it - the viewentry one is the one I always see in "the field" which causes memory issues - having to recycle the document part even if you have never referenced it - where would most people pick up on that?Steve Castledine#
JerryJerry Carter#
- SWT (uses native widgets): dispose()
- JDBC: close() does that, but its the same if you don't use pure Java JDBC-Driver (type 1, 2 and 3 me thinks).
- Presumably JNI
The problem ist that a lot of people don't know so it should have been better documented. Axel Janssen#
When it comes to LS2J however, the developer is in trouble: the leaks happen in a place that we can’t touch. Whilst my wiki code now frees up all relevant objects (
JavaObject,JavaSession, and so on), it still leaks.So, LS2J. Good idea, iffy implementation: often the story of Notes’ life!Ben Poole#
- recycling
- setting parameters in java.policy under jvm\lib\security
- setting parameters in java.security under jvm\lib\security
- placing jar files under Domino folder jvm\lib\ext instead of attaching them to the java agent
- downgrading the versions of the jar files used in agent (commons-net and axis)
- restarting server to clean up any 'dirt' in JVM
My last go was to start the agent via LEI. Goal ! The agent started and ran carelessly. Checking the ACL revealed that the server was not in the ACL. (LEI is setup up on another server)
My advice is check the ACL, server must be stated. For agents running as a web service check the 'Run on behalf of' plus the 'Set run time security level' properties on agent, too. Insert the server name in 'Run on behalf of' and set 'Security level' to 3. I my case the headage disappeared.
Kim Petersen#