question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

migrations could trigger 'out of shared memory' error on postgres

See original GitHub issue

From andrewklau on discord.

FATA[0019] apply failed: [postgres-error] postgres query error ($.args[112].args)
File: ''
[53200] FatalError: out of shared memory
Hint: You might need to increase max_locks_per_transaction. 

Workarounds:

  1. https://github.com/hasura/graphql-engine/issues/1325#issuecomment-452216310
  2. https://github.com/hasura/graphql-engine/issues/1325#issuecomment-453825062

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
elgordinocommented, Jan 13, 2019

I hit this with my docker postgres instance when performing many ALTER TABLE commands. In my use case I don’t see it as an Hasura issue, I want all these actions performed in a single transaction. Modifying the docker-compose to set the max_locks_per_transaction worked

    image: postgres
    restart: always
    ports:
    - "5432:5432"
    volumes:
    - db_data:/var/lib/postgresql/data
    command: postgres -c max_locks_per_transaction=2000
2reactions
howientccommented, Dec 3, 2019

Just starting running into this on Azure Postgres. Don’t see a way to set the max_locks_per_transaction on that.

Squashing worries me - what happens when this occurs again? If I squash then, how does it know which migrations to apply?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use triggers and cause 'out of shared memory' error in ...
I understand I can increase the max_locks_per_transaction , but I want to ask that why this error didn't appear the first few days...
Read more >
You might need to increase max_locks_per_transaction
After a few thousand tables, PostgreSQL will error out: “out of shared memory”. What you can see is that we created all those...
Read more >
[GENERAL] Out of memory/corrupted shared memory problem ...
While restoring a dump from our development server (768G ram) to the production server, (PG 9.6.3 on Debian Stretch with 128G Ram) the ......
Read more >
Re: Out of memory/corrupted shared memory problem on server
I can think of two likely scenarios: 1. You've stumbled across some kind of memory-leak bug in Postgres. aggregation, the actual consumption  ......
Read more >
Shared Memory Problem (unable to allocate ... - Ask TOM
Check out a quick year in review ... structures in the shared memory of Oracle from concurrent ... we did not get this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found