53400: configuration_limit_exceeded
PostgreSQL의미
구성 한도를 초과해 작업이 실패했다. 정의된 한도(예: temp_file_limit, replication slot 또는 WAL sender 수) 때문에 서버가 요청을 거부했다.
원인
전형적인 예: 쿼리의 임시 파일 사용량이 temp_file_limit를 초과('temporary file size exceeds temp_file_limit'), 모든 replication slot이 사용 중('all replication slots are in use', max_replication_slots), max_wal_senders 한도 초과. 참고: max_prepared_transactions 소진은 53200을, prepared transaction 비활성화(값 0)는 55000을 반환한다.
해결 방법
오류 메시지에 어떤 한도를 초과했는지 나와 있다. temp_file_limit의 경우 쿼리를 최적화하고(EXPLAIN ANALYZE로 디스크로 넘치는 sort/hash 단계를 찾는다), 필요하면 세션 수준에서 work_mem을 늘리거나 한도를 의도적으로 높인다. slot이 소진되었다면 소유자를 확인한 후 사용하지 않는 slot을 정리하거나: SELECT slot_name, slot_type, active FROM pg_replication_slots; max_replication_slots / max_wal_senders를 늘리고 서버를 재시작한다.