# ERROR: out of shared memory

**URL:** <https://forums.percona.com/t/error-out-of-shared-memory/35028>\
**Category:** PostgreSQL\
**Created:** [November 14, 2024, 10:19am UTC](https://forums.percona.com/t/error-out-of-shared-memory/35028 "2024-11-14T10:19:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jruffer](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jruffer/32/16566_2.png) [@jruffer](https://forums.percona.com/u/jruffer)\
**Post date:** [November 14, 2024, 10:19am UTC](https://forums.percona.com/t/error-out-of-shared-memory/35028/1 "2024-11-14T10:19:34Z")

</div>

ERROR: out of shared memory  
HINT: You might need to increase max\_locks\_per\_transaction.  
I’ve increased it from 64 to 1024 but that hasn’t made a difference.

---

<div class="post-metadata">

**Author:** ![Kai\_Wagner](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kai_wagner/32/6286_2.png) [@Kai\_Wagner](https://forums.percona.com/u/Kai_Wagner)\
**Post date:** [November 14, 2024, 10:48am UTC](https://forums.percona.com/t/error-out-of-shared-memory/35028/2 "2024-11-14T10:48:25Z")

</div>

Hi,

could you please provide us with a few more details? Which distribution are you on? Which software are you exactly using? You did upgrade from which version to which? What are you general specs of your hardware? Is there anything in the logs?

With more details, we would be able to better support and to look into it.

Thanks,

Kai

---

<div class="post-metadata">

**Author:** ![jruffer](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jruffer/32/16566_2.png) [@jruffer](https://forums.percona.com/u/jruffer)\
**Post date:** [November 14, 2024, 10:56am UTC](https://forums.percona.com/t/error-out-of-shared-memory/35028/3 "2024-11-14T10:56:06Z")

</div>

Hi Kai,  
Standard distribution. 16.4. Hasn’t been upgraded.  
The software that is triggering the error is HVR.  
Hyper-V VM with 24 cores, 64 GB memory, Disks local to Hyper-V host.

2024-11-14 10:45:41.118 GMT [36886]: u= db= app= c= s=[6735d27d.9016:3] tx=[:0] LOG: checkpoint starting: time  
2024-11-14 10:47:13.102 GMT [37031]: u=[hvragent] db=[equiptest] app=[hvr\_integrate] c=[::1] s=[6735d293.90a7:6] tx=[3/11:85848253] ERROR: out of shared memory  
2024-11-14 10:47:13.102 GMT [37031]: u=[hvragent] db=[equiptest] app=[hvr\_integrate] c=[::1] s=[6735d293.90a7:7] tx=[3/11:85848253] HINT: You might need to increase max\_locks\_per\_transaction.  
2024-11-14 10:47:13.102 GMT [37031]: u=[hvragent] db=[equiptest] app=[hvr\_integrate] c=[::1] s=[6735d293.90a7:8] tx=[3/11:85848253] STATEMENT: insert into “ramsnapshotqtyasset” (  
“period\_no”,  
“company\_no”,  
“stock\_no”,  
“stock\_code”,  
“ramqtyasset\_ramno”,  
“ramsnapshotqtyasset\_purchase”,  
“ramsnapshotqtyasset\_nbv”  
)  
values (  
$1,  
$2,  
$3,  
$4,  
$5,  
$6,  
$7  
)

I have increased max\_connections to 100. I have set max\_locks\_per\_transaction to 4096.

Regards  
Jeremy

---

<div class="post-metadata">

**Author:** ![Kai\_Wagner](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/kai_wagner/32/6286_2.png) [@Kai\_Wagner](https://forums.percona.com/u/Kai_Wagner)\
**Post date:** [November 14, 2024, 11:43am UTC](https://forums.percona.com/t/error-out-of-shared-memory/35028/4 "2024-11-14T11:43:13Z")

</div>

Hi,

Thanks for the additional information. As this is a third-party tool, it’s hard to give the perfect advice, but something I’m wondering about is the actual memory values in your postgresql.conf.

The issue is triggered by the hvr-agent so maybe the agent even provides more options to “tune” it?

Kai

---

<div class="post-metadata">

**Author:** ![jruffer](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jruffer/32/16566_2.png) [@jruffer](https://forums.percona.com/u/jruffer)\
**Post date:** [November 14, 2024, 12:38pm UTC](https://forums.percona.com/t/error-out-of-shared-memory/35028/5 "2024-11-14T12:38:30Z")

</div>

Yes, I’ve made a change to HVR to limit the size of transactions and it appears to be working now, at least it hasn’t errored yet.

What puzzles me is the size of shared memory. ipcs is saying 56 bytes where I would have expected something more like 12GB.
