-
1. Re: Memory usage in Workflow wait states
kukeltje Aug 4, 2007 8:03 PM (in response to zazzaz)Will the 1000 instances be in memory for 7 days (or until they receive the message)
no[or will they be swapped to make space for other instances?
no
They are just in the database -
2. Re: Memory usage in Workflow wait states
zazzaz Aug 6, 2007 4:36 AM (in response to zazzaz)Hi,
thanks for previous reply!
One more question, so I can continue my work.
Is the database memorization an automatic thing?
Thanks a lot. Bye -
3. Re: Memory usage in Workflow wait states
kukeltje Aug 6, 2007 6:34 AM (in response to zazzaz)what is 'database memorization'?
-
4. Re: Memory usage in Workflow wait states
zazzaz Aug 6, 2007 11:52 AM (in response to zazzaz)Are the process instances saved in the database automatically when they reach a wait state that takes a lot to be completed (without using CPU)?
-
5. Re: Memory usage in Workflow wait states
kukeltje Aug 6, 2007 12:06 PM (in response to zazzaz)Are the process instances saved in the database automatically when they reach a wait state
Yeshat takes a lot to be completed (without using CPU)?
??? what do you mean here? -
6. Re: Memory usage in Workflow wait states
zazzaz Aug 7, 2007 2:56 AM (in response to zazzaz)Thanks again.
The situation is the syncronization on a shared object.
Suppose in the wait state we have a code such
myObject.wait()
(or a similar method call that may block this process instance).
Will the process instance be saved automatically and free the memory it holded?
Bye -
7. Re: Memory usage in Workflow wait states
kukeltje Aug 8, 2007 1:22 PM (in response to zazzaz)don't do wait() in nodes/states/actions unless they are async... If it is in a wait it is 'working' and not persisted
-
8. Re: Memory usage in Workflow wait states
zazzaz Aug 8, 2007 3:32 PM (in response to zazzaz)ok,
now it's all perfect.
The solution is
persisting the instance
wait for the asynch call to complete
restore the instance and give it the call result
Bye -
9. Re: Memory usage in Workflow wait states
kukeltje Aug 8, 2007 6:55 PM (in response to zazzaz)and the nice thing is... all three happen automatically in jBPM..
-
10. Re: Memory usage in Workflow wait states
zazzaz Aug 9, 2007 11:16 AM (in response to zazzaz)Excellent
So If I write a library for receiving message and an asynchronus receive call takes one day to be completed, the process instance is automatically saved!
Will the instance be removed from runtime memory usage or not? -
11. Re: Memory usage in Workflow wait states
zazzaz Aug 9, 2007 11:23 AM (in response to zazzaz)Excellent
And will it free the memory of the process instance when it saves it and waits for the asynchronus call to be completed? -
12. Re: Memory usage in Workflow wait states
kukeltje Aug 9, 2007 1:56 PM (in response to zazzaz)no, it will keep everything in memory as is very good practice. these days since memory is cheap. Besides that...if your jbpm engine handles more than 100 process instances per day (not specifically new ones), you have to restart your j2ee server each day. If you handle more than 1000 instances a day you have to reset your j2ee server each day and your hardware each week.
-
13. Re: Memory usage in Workflow wait states
jeffcwang Aug 9, 2007 5:36 PM (in response to zazzaz)Hello Ronald,
Can you please elaborate on why you'd have to restart the j2ee server each day if JBPM handles > than 100 process instances/day? Does JBPM have a problem scaling? It seems like 100 process instances isn't that many...
thanks -
14. Re: Memory usage in Workflow wait states
zazzaz Aug 10, 2007 3:20 AM (in response to zazzaz)Ok,
my situation is the following.
I've to execute a very large number of process instances but they're not started all in the same time.
This number can be even 1 million per day!
Some of this instances will live for a few minutes, since the answer they wait for arrives soon, while the others will wait days...
So can I free the useless memory usage of this kind of processes (since they're doing no work at all) or not?