-
1. Re: couldn't commit hibernate session (java.lang.OutOfMemory
patrickvanamstel May 19, 2006 5:57 AM (in response to patrickvanamstel)The problem is fixed by setting the ehcache to a more conservative objects in memory setting
-
2. Re: couldn't commit hibernate session (java.lang.OutOfMemory
patrickvanamstel May 19, 2006 6:52 AM (in response to patrickvanamstel)Solution does not seem to work. So i was a bit to soon.
So ony tips would be welcome.
Is there maybe a hibernate setting i can use?? -
3. Re: couldn't commit hibernate session (java.lang.OutOfMemory
kukeltje May 19, 2006 11:49 AM (in response to patrickvanamstel)can you profile the application and see what takes up the memory?
btw, how many variables are you using in your processdefinition? I never get any higher than 20-25 in development fase and 10 if I change to using a dossier for most business info -
4. Re: couldn't commit hibernate session (java.lang.OutOfMemory
patrickvanamstel May 30, 2006 2:15 AM (in response to patrickvanamstel)Thank you for your reaction. Back from holiday i'm continueing
my quest for variables and memory usage/
I'm not used using profiling tools.
But in short i'm doing the programatic fork / join. In the fork i create variable's which are byte arrays.
final ExecutionContext newExecutionContext = new ExecutionContext(newToken);
//newExecutionContext.getContextInstance().createVariable(Constants.XML_DOCUMENT_STRING,baos.toByteArray(), newToken);
newExecutionContext.getContextInstance().createVariable(Constants.XML_DOCUMENT_STRING,baos.toByteArray(), newToken);
newExecutionContext.getJbpmContext().save(executionContext.getProcessInstance());
There could be 10.000 variables created. So it is important that the memory usage is as low as possible.
Is it possible to commit the hiberbate transaction inbetween. Cause after
the last line a commit would be fine by me.
The biggist question ofcourse is. How does the transaction influence the
memory usage. And when are the variables persisted.
Maybe jbpm is not the proper java framework for processing
this, but it seemed very usefull. So here some context
Process in short is:
One file -> validate
Split - file -> (10 till 100.000)
If failure user interaction
Otherwise -> continue till done
Report to customer
Report to calculations
The user interaction will only happen when the instream fails. -
5. Re: couldn't commit hibernate session (java.lang.OutOfMemory
kukeltje May 30, 2006 2:51 AM (in response to patrickvanamstel)For storing this kind/amount of data we (the company I work for) do not use jbpm variables. We store the data externally and store a reference to it in a jbpm variable.
The number of variables per processinstance in development can grow to 20-30 but eventually it almost never exceeds 10.
Is this a possible solution? -
6. Re: couldn't commit hibernate session (java.lang.OutOfMemory
patrickvanamstel May 30, 2006 6:09 AM (in response to patrickvanamstel)If that is the way to go i must consider it. Because i do not want to go against the flow.
But actually i solved the problem by adding to line of code to the persistance code.
DbPersistenceService.java
// added
session.flush();
session.clear();
// before
transaction.commit();
This seems to help my out of memory.
But i havent testet it to death yet.
But wat i want to do next is off load the variables to a queue
and process it from there.
But now i'm first trying to get a grip on the logging.
(Now posting a new post about the processInstance id)
thx Patrick