Possible problem - balance adjustment looping
I am porting an RxWorks system and am up to the stage of converting/moving the payment data. All appears to be working except for one large 'customer', "Counter Sales", which is the RxWorks equivalent of OTC. There are some 68,000 payment transactions for this 'customer' - the next largest customer (a kennels/cattery business) has only 1200.
When I select the "Counter Sales" customer, I get the 'Please wait...' box and this never closes [even after letting it run for a couple of hours]. MySql is running hard doing some 2.3MB/sec on the acts file, 0.9MB/sec on financial_acts, and 11.3MB/sec on participations. The only way out is to close the browser.
When I opened the kennels/cattery, it opened happily after a short delay.
So even though "Counter Sales" has some 68 times the number of transactions, it is processing for far more time than this - ie its looping.
Blundering around in the dark I came across the genbalance script, and ran genbalance -c. it ran through the customers until it came to Counter Sales, and its been working on that for 5 hours. Definitely a looping problem.
Any suggestions?
Regards, Tim
Re: Possible problem - balance adjustment looping
The reason the Counter Sales customer is taking so long to load is probably due to the app trying to determine its current balance. This is done by totalling all debits that haven't been fully allocated credits.
You need to run the genbalance script after you've loaded customer debits and credits in order to match debits to credits; this means that the customer's current balance can then be determined from a much smaller number of debits and credits - those that have not be fully allocated.
The genbalance tool probably doesn't have enough memory by to handle 68000 entries efficiently; it will likely be shedding its caches trying to free memory, and then being forced to re-read the data it has just shed.
Try increasing the memory by editing genbalance.bat as follows:
This gives the app 768M if required.
Re: Possible problem - balance adjustment looping
I tried your suggestion of pushing the max heap to 786M - still the same. Tried 3GB - still same.
I have put the problem aside for the moment (I need to convert the RxWorks 'Counter Sales' to OPV OTC transactions so there will not be a customer with a huge numbe of transactions) since I am not confident that I am loading things correctly - see new topic about till money.
Thanks for your input.
Re: Possible problem - balance adjustment looping
Hi Tim,
I have done quite a few Rx migrations and I have my genbalance Mx set to 512m and it processes the counter sales account Ok but does take a bit of time (not 5 hours though). I suspect the problem may be your transforms linking payments and invoices to the participation.customerAccountBalance. I suggest dont do this as genbalance will do this work for you as it processes the allocations.
Cheers Tony