OutOfMemory during server x-tension funct parameter handling

Hello there,

I’ve slightly modified the java example Java_Trigger/SXSJTrigger.java so that the writeLog()-Method - that does the work in that exam - looks like this:

private void writeLog(String type, String collection, String doctype, String ino_id, String objOld, String objNew) {
// write given document into Backup-Collection of given collection
StringBuffer Response = new StringBuffer();
StringBuffer XMLMessage = new StringBuffer();


int ret = SxsXMLProcess(collection + "-Backup", objNew, Response);

if (ret != 0) {
    SxsXMLGetMessage(XMLMessage);
    SxsException(ret, XMLMessage.toString());
}
}

After insertion/updating of about 25 documents, I’ve got:

Tamino access failure (7126, INOSXE7126, Server extension failed, INOSXE7125: Java error during server extension function parameter handling: ‘java.lang.OutOfMemoryError’)

What can be the reason?

And how to get the Tamino server/collection into a working state, again?

Tnx in advance,
Franco.

You do not provide much context.

What version of Tamino is this? Is there a stack trace for the OutOfMemoryError? Are the documents large/small?

Hi Mark,
the Tamino Version is V 4.4.1.4 on SUSE Linux 9/32. The (test) documents have a size between 20k - 200k.

The amazing fact for me is that I just use ONE simple SxsXMLProcess()-call which is obviously responable for allocating memory in the JVM which never gets freed.

The error blocks all CRUD-operations on the collection/doctype that uses the trigger. Since one cannot restart a JVM for a collection, you are forced to restart the complete Tamino DB (with users working on other collections)!!!

Where can I see more detailed stack traces of the x-tension? Should I activate “Trace X-Tension” in the SMH?

Sincerly,
Franco

The error is somewhat odd and has unfortunate consequences. I think that the locks would timeout eventually.

It is possible that it may be related to the platform that you are running on. Or it may be related to the Tamino version. There was some considerable work on X-Tension memory handling that should have appeared in Tamino 4.4.1.8 or above.

It would be useful if you were able to try the code out against the latest Tamino 4.4 on a test box? If that fails then please report a problem to support.

We make considerable use of X-Tensions in our own products so the code is exercised internally.