Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016172Openbravo ERP01. General setuppublic2011-03-08 17:342011-06-20 10:23
xabiermerino 
jpabloae 
highminoralways
closedfixed 
5
3.0RC4 
3.0MP0 
Core
No
0016172: It is not possible to delete a client
According this configuration, http://wiki.openbravo.com/wiki/ERP/2.50/Openbravo_environment_installation [^]

It is not possible to delete a client. This error appears:

Error:
out of shared memory
- As System Administrator create a client
- Login as admin of the new client.
- Create 5 organizations
- As System Administrator try to delete the new client
- Realize that the error appears
No tags attached.
depends on backport 0017654 closed gorka_gil It is not possible to delete a client 
has duplicate defect 0016550 closed jpabloae Delete Client runs out of memory in community appliance 
Issue History
2011-03-08 17:34xabiermerinoNew Issue
2011-03-08 17:34xabiermerinoAssigned To => adrianromero
2011-03-08 17:34xabiermerinoModules => Core
2011-03-08 17:34xabiermerinoIssue Monitored: networkb
2011-03-08 17:49adrianromeroAssigned Toadrianromero => jpabloae
2011-03-08 17:49adrianromeroIssue Monitored: adrianromero
2011-03-10 16:20jpabloaeStatusnew => acknowledged
2011-03-10 16:21jpabloaeNote Added: 0034733
2011-03-10 16:34xabiermerinoNote Added: 0034736
2011-04-01 13:28egoitzNote Added: 0035462
2011-04-04 12:19rafademiguelIssue Monitored: rafademiguel
2011-04-04 12:35jpabloaeNote Added: 0035529
2011-04-04 12:39jpabloaeNote Added: 0035530
2011-04-04 12:40jpabloaeRelationship addedhas duplicate 0016550
2011-05-23 10:25jpabloaeStatusacknowledged => scheduled
2011-05-23 10:25jpabloaefix_in_branch => pi
2011-05-23 10:26jpabloaeNote Added: 0037304
2011-05-23 10:26jpabloaeStatusscheduled => resolved
2011-05-23 10:26jpabloaeFixed in Version => 3.0MP7
2011-05-23 10:26jpabloaeFixed in SCM revision => n/a
2011-05-23 10:26jpabloaeResolutionopen => fixed
2011-06-02 00:56gorka_gilNote Added: 0037902
2011-06-02 10:29gorka_gilNote Added: 0037906
2011-06-02 10:30gorka_gilNote Added: 0037907
2011-06-02 10:30gorka_gilStatusresolved => closed
2011-06-02 10:30gorka_gilFixed in Version3.0MP7 => 3.0MP0
2011-06-17 10:27maiteRelationship addedrelated to 0017654
2011-06-20 10:23gorka_gilRelationship replaceddepends on 0017654

Notes
(0034733)
jpabloae   
2011-03-10 16:21   
Xabi,

Where have you reproduced this? Cloud Appliance? Community Appliance? Ubuntu?
(0034736)
xabiermerino   
2011-03-10 16:34   
Hi Juan Pablo,

it is reproducible in ubuntu stack and also at live.builds.openbravo.com.

Could be a problem with share buffer memory on Postgre?
(0035462)
egoitz   
2011-04-01 13:28   
The kernel.shmmax parameter on ubuntu stack and appliance should have a higher value, and it should be possible to modifiy the shared_buffer propoery
on postgresql.conf file to use more memory.

With 256MB the performance is improved
(0035529)
jpabloae   
2011-04-04 12:35   
From 0016550:

This is related to the PostgreSQL memory allocation. It is necessary to increase it to remove this error. We'll deploy a fix for the appliance, but meanwhile you can apply it yourself in your current running ones:

1) Increase the kernel limits:

echo >> /etc/sysctl.conf
echo "# Openbravo - PostgreSQL" >> /etc/sysctl.conf
echo "kernel.shmmax = 268435456" >> /etc/sysctl.conf
sysctl -p /etc/sysctl.conf

2) Increase the PostgreSQL memory allocation:

Edit /srv/pgsql/8.4/postgresql.conf and set "shared_buffers" to 128MB.

3) Restart PostgreSQL:

/etc/init.d/tomcat stop
/etc/init.d/postgresql restart
/etc/init.d/tomcat start
(0035530)
jpabloae   
2011-04-04 12:39   
Note: we'll fix in the appliances. But we cannot fix it in Ubuntu, because it's not allowed for a package to change the kernel memory parameters:
https://bugs.launchpad.net/ubuntu/+source/postgresql-8.3/+bug/264336 [^]

So for Ubuntu we'll document it and state it clearly in the installation guide. And perhaps also with a message at the end of the installation process.
(0037304)
jpabloae   
2011-05-23 10:26   
Fix included in the RC7 appliance.
(0037902)
gorka_gil   
2011-06-02 00:56   
The problem is in the max_locks_per_transaction parameter, since the delete client touch in the same transaction more tables than the default configuration allows.

Increasing the max_locks_per_transaction in postgresql.conf from (64 standard) to 200, solves the problem.

Note: the max locks per transaction uses shared memory, so if your configuration of shared buffers is very low, increasing this parameter can make necessary to increase also the shared buffers parameter.
(0037906)
gorka_gil   
2011-06-02 10:29   
This fix will be included in MP0 appliances, except in Ubuntu since it is not allowed that an application modify the kernel parameters.

The default configuration included will be:
* (postgresql.conf) max_locks_per_transaction = 200
* (postgresql.conf) shared_buffers = 128MB
* (kernel) kernel.shmmax = 167772160 (160MB)

Also, starting from MP0 appliances, it is included a script that make these changes and restart postgresql:
  # /etc/init.d/tomcat stop
  # /usr/share/ops-base/bin/pgsql-tune
  # /etc/init.d/tomcat start
(0037907)
gorka_gil   
2011-06-02 10:30   
Verified