# AWX k3s error psycopg2.OperationalError: FATAL: out of shared memory

**URL:** <https://forum.ansible.com/t/awx-k3s-error-psycopg2-operationalerror-fatal-out-of-shared-memory/4740>\
**Category:** Get Help\
**Tags:** documentation, awx, howto\
**Created:** [April 4, 2024, 8:57pm UTC](https://forum.ansible.com/t/awx-k3s-error-psycopg2-operationalerror-fatal-out-of-shared-memory/4740 "2024-04-04T20:57:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kazichaska](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kazichaska/32/2788_2.png) [@kazichaska](https://forum.ansible.com/u/kazichaska)\
**Post date:** [April 4, 2024, 8:57pm UTC](https://forum.ansible.com/t/awx-k3s-error-psycopg2-operationalerror-fatal-out-of-shared-memory/4740/1 "2024-04-04T20:57:15Z")

</div>

k3s version v1.28.8+k3s1 (653dd61a)  
awx-operator 2.0.0

I am seeing psycopg2.OperationalError: FATAL: out of shared memory on jobs and also following from running command

Traceback (most recent call last):  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/backends/utils.py”, line 84, in \_execute  
return self.cursor.execute(sql, params)  
psycopg2.errors.OutOfMemory: out of shared memory  
HINT: You might need to increase max\_locks\_per\_transaction.

kubectl -n awx logs -f pod/awx-task-867cb684c9-rbvrc -c awx-task | grep -i error

2024-04-04 15:54:21,213 ERROR [bcbgnghnghgaab704cbb890c9528a] awx.main.dispatch Worker failed to run task awx.main.scheduler.tasks.task\_manager(\*, \*\*{}  
psycopg2.OperationalError: FATAL: out of shared memory  
django.db.utils.OperationalError: FATAL: out of shared memory  
2024-04-04 15:54:49,649 WARNING [hgfhgfhgjh4eec25d203214] awx.main.dispatch job 26623 (failed) encountered an error (rc=None), please see task stdout for details.  
2024-04-04 15:55:19,357 WARNING [-] awx.main.commands.run\_callback\_receiver Error in events bulk\_create, will try indiviually, error: out of shared memory  
2024-04-04 15:55:19,359 INFO [-] awx.main.commands.run\_callback\_receiver Database Error Saving individual Event uuid=3cb672a9-d193-4187-81ac-107029dfbd41 try=1, error: out of shared memory  
2024-04-04 15:55:19,361 INFO [-] awx.main.commands.run\_callback\_receiver Database Error Saving individual Event uuid=e2e1c6f1-cee4-45a9-883f-86072712d676 try=1, error: out of shared memory  
2024-04-04 15:55:19,385 WARNING [-] awx.main.commands.run\_callback\_receiver Error in events bulk\_create, will try indiviually, error: out of shared memory  
2024-04-04 15:55:19,385 WARNING [-] awx.main.commands.run\_callback\_receiver Error in events bulk\_create, will try indiviually, error: out of shared memory

Doing Google search shows need to adjust postgres setting like [CleanUp Job Run fails with psycopg.errors.OutOfMemory: out of shared memory HINT: You might need to increase max\_locks\_per\_transaction. · Issue #14612 · ansible/awx · GitHub](https://github.com/ansible/awx/issues/14612) or [Why I'm Getting Internal Server Error on The Ansible Tower UI With 'psycopg2.errors.OutOfMemory: out of shared memory' Errors In the Logs? - Red Hat Customer Portal](https://access.redhat.com/solutions/5808691)

PostgresSQL is not external and want to configure these using Extra config using awx.yml so on build it will set things up. Has someone run into this issue or have some suggestion?

TIA.
