Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0009140Openbravo ERP01. General setuppublic2009-05-22 11:472009-08-20 00:00
roklenardic 
shuehner 
highmajoralways
closedfixed 
20Ubuntu 9.04
2.50MP1 
pi 
Core
No
0009140: Delete Client never finishes
Delete Client does not finish after 30 minutes despite the new client being empty (not trying to delete big bazaar). Weird behaviour considering a 2.5Ghz dualcore computer with 4Gb or RAM.

I was using the 2.50MP1 virtual machine with virtual box
1) create a new client using Initial Client Setup
2) do the Delete Client
No tags attached.
Issue History
2009-05-22 11:47roklenardicNew Issue
2009-05-22 11:47roklenardicAssigned To => rafaroda
2009-05-25 10:07rafarodaNote Added: 0016606
2009-05-25 10:07rafarodaStatusnew => feedback
2009-05-26 12:56roklenardicNote Added: 0016656
2009-05-29 11:14psarobeStatusfeedback => scheduled
2009-05-29 11:14psarobeNote Added: 0016757
2009-05-29 11:14psarobeAssigned Torafaroda => shuehner
2009-05-29 11:14psarobefix_in_branch => pi
2009-05-29 11:15psarobePrioritynormal => high
2009-05-29 11:15psarobefix_in_branchpi =>
2009-07-02 11:58roklenardicNote Added: 0017756
2009-07-29 13:16shuehnerNote Added: 0018687
2009-07-29 13:23roklenardicNote Added: 0018688
2009-07-29 14:31shuehnerNote Added: 0018689
2009-07-29 16:55hgbotCheckin
2009-07-29 16:55hgbotNote Added: 0018692
2009-07-29 16:55hgbotStatusscheduled => resolved
2009-07-29 16:55hgbotResolutionopen => fixed
2009-07-29 16:55hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f677d6c966a21a66c0ae0e8646710cef3eb4de28 [^]
2009-07-29 18:22hgbotCheckin
2009-07-29 18:22hgbotNote Added: 0018698
2009-07-29 18:22hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/f677d6c966a21a66c0ae0e8646710cef3eb4de28 [^] => http://code.openbravo.com/erp/devel/pi/rev/40c4d1285238b88e6557a346cab8662060375464 [^]
2009-08-19 11:15sureshbabuStatusresolved => closed
2009-08-19 11:15sureshbabuNote Added: 0019048
2009-08-19 11:15sureshbabuFixed in Version => pi
2009-08-20 00:00anonymoussf_bug_id0 => 2840618

Notes
(0016606)
rafaroda   
2009-05-25 10:07   
Hi Rok,

I was able to delete a newly created Client in 2 minutes.

Could you please try to reproduce this issue again?

Thanks.
(0016656)
roklenardic   
2009-05-26 12:56   
OK, it finished but in the VM it needs around 20minutes, weird.
(0016757)
psarobe   
2009-05-29 11:14   
I face the same issue in VMware
(0017756)
roklenardic   
2009-07-02 11:58   
Just tested MP2 virtual machine, and again, on a brand new 2.5Ghz, 3Gb RAM computer it takes almost 45minutes to delete a practically empty client just created using the initial client setup.

this was scheduled for a fix in mp1, nothing has happened though?
(0018687)
shuehner   
2009-07-29 13:16   
I could reproduce the issue with the 2.50MP2 virtualbox appliance. Setup in virtualbox 1G mem for the vm not other special setup.

Testcase:
1.) Initial Client setup (w.o. accounting)
2.) Delete client (runtime was about 30-45min)
(0018688)
roklenardic   
2009-07-29 13:23   
I suspect the VM uses so much memory with this process that it starts swapping and becomes exponentially slow.

This does not happen on a properly configured local machine where a delete client operation takes 2-5mins.
(0018689)
shuehner   
2009-07-29 14:31   
Note: Testing reveals zero swap usage on host and inside the vm, nearly zero i/o.

I suppose your local machine testcase is not an exact replica meaning it will likely not contain the BigBazaar client. Could you confirm.

Main reason for the slowness is usage of an NOT IN (list) clause which is not optimized by postgres and together with BigBazaar which ships 70k lines in several tables makes it really slow. Checking postgres logfile reveals that >=90% time is spent in only a few sql statements using this idiom.

A possible solution is known for this but involves splitting the pl into different coedepath for oracle/postgres :(
(0018692)
hgbot   
2009-07-29 16:55   
Repository: erp/devel/pi
Changeset: f677d6c966a21a66c0ae0e8646710cef3eb4de28
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Wed Jul 29 16:55:40 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f677d6c966a21a66c0ae0e8646710cef3eb4de28 [^]

Fixed 9140: Speed up delete client on postgres

---
M src-db/database/model/postscript-PostgreSql.sql
---
(0018698)
hgbot   
2009-07-29 18:22   
Repository: erp/devel/pi
Changeset: 40c4d1285238b88e6557a346cab8662060375464
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Wed Jul 29 18:19:07 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/40c4d1285238b88e6557a346cab8662060375464 [^]

Issue 9140: Fix stupid qouting error in last commit

---
M src-db/database/model/postscript-PostgreSql.sql
---
(0019048)
sureshbabu   
2009-08-19 11:15   
Tested working fine can able to delete within 3 to 4 minutes in virtual box)