DrDroid

PostgresDB 53200: Out of memory

When the database server runs out of memory during an operation.

👤

Stuck? Let AI directly find root cause

AI that integrates with your stack & debugs automatically | Runs locally and privately

Download Now

What is PostgresDB 53200: Out of memory

Check current memory usage:SELECT pg_size_pretty(pg_database_size(current_database())) AS db_size;Identify large objects consuming space:SELECT nspname || '.' || relname AS "relation", pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size"FROM pg_class CLEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)WHERE nspname NOT IN ('pg_catalog', 'information_schema')ORDER BY pg_total_relation_size(C.oid) DESCLIMIT 10;Check long-running queries that might be locking resources:SELECT pid, now() - pg_stat_activity.query_start AS duration, query, stateFROM pg_stat_activityWHERE (now() - pg_stat_activity.query_start) > interval '5 minutes'AND state != 'idle'ORDER BY duration DESC;Terminate long-running queries if necessary:SELECT pg_cancel_backend(pid);If the issue persists, consider increasing the memory available to PostgreSQL:Temporarily increase the work_mem setting for the current session:SET work_mem = '256MB';For a more permanent solution, modify postgresql.conf and restart the database:Find the file location:SHOW config_file;Edit postgresql.conf, increase work_mem and/or shared_buffers, then restart PostgreSQL.

PostgresDB 53200: Out of memory

TensorFlow

  • 80+ monitoring tool integrations
  • Long term memory about your stack
  • Locally run Mac App available
Read more

Time to stop copy pasting your errors onto Google!