Genbalance stack size suggestion

If you run genbalance on a customer with a large number of transactions it will stack overflow.

In my case the 'EIAH Counter Sales" account has 1875 transactions and this was causing the error.

Suggestion - set the max stack size parameter in the genbalance script to say 128M - ie replace the current line


 java org.openvpms.archetype.tools.account.AccountBalanceTool --context ../conf/applicationContext.xml %*% 

by


 java -Xms128m org.openvpms.archetype.tools.account.AccountBalanceTool --context ../conf/applicationContext.xml %*% 

From what I can gather the default max stack size on a modern machine is 64M so the above is doubling it.

Note that this is a minor minor problem and it only affects people like me who are converting existing systems that have been running for some time. [The above 1875 number is only the counter sales since 1/1/2012 - we discarded the older ones in the conversion.]

Regards, Tim G

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Genbalance stack size suggestion

That sets the initial size of memory allocated to the JVM. Its probably better to set  a maximum size instead, that the JVM can grow to if necessary. Given that genbalance is only run as an administrative function, and you always want it to succeed, setting a large maximum would be better e.g.

java -Xmx512M ......

Re: Genbalance stack size suggestion

You are right Tim - I screwed up - it is Xmx not Xms, and I agree with the 512 approach.  Regards, Tim G

Syndicate content