FortiSIEM
FortiSIEM provides Security Information and Event Management (SIEM) and User and Entity Behavior Analytics (UEBA)
idabouzi
Staff
Staff
Article Id 345745

 

Description This article describes how to fix the 'Error PSQLException: ERROR: no shared memory available'.
Scope FortiSIEM.
Solution

This error occurs when queries are causing postgresql to run out of shared memory:


Error: "Error PSQLException: ERROR: no shared memory available
Tip: You may need to increase max_locks_per_transaction."

 

As the message indicates, the value of 'max_locks_per_transaction' has to be increased. In the case below, it will be increased to 200, but in other cases, it can be increased to 1024.

 

  • Backup /cmdb/data/postgresql.conf file:


cp -rp /cmdb/data/postgresql.conf /cmdb/data/postgresql.conf.orig

 

Change the value of #max_locks_per_transaction:


vi /cmdb/data/postgresql.conf

From: # max_locks_per_transaction = 64 # min 10
to: max_locks_per_transaction = 200 # min 10

 

  • Save the changes and exit.
  • Restart postgresql-13 service:

 

systemctl stop postgresql-13
systemctl start postgresql-13

 

  • Clear the cache and restart the Appserver:


su admin
cd /opt/phoenix/cache/
mv <Super_IP_dir> <Super_IP_dir>_old => example mv 10.0.0.1 10.0.0.1_old

 

cd /opt/glassfish/domains/domain1/
rm -rf generated/
rm -rf osgi-cache/
killall -9 java

 

Wait for 5-10 minutes and check the phProesses rate up with the 'phstatus' command.