fix: increase TimescaleDB tuple decompression limit to unlimited
Fixes ERROR 53400 (configuration_limit_exceeded) during large interface sync operations in device discovery. The sync_interfaces operation was decompressing 146,603 tuples but the default limit was 100,000. Setting to 0 (unlimited) removes this constraint. Error occurred in: Towerops.Snmp.Discovery.sync_interfaces/2
This commit is contained in:
parent
1b11bb25fc
commit
a7ab2831b3
1 changed files with 20 additions and 0 deletions
|
|
@ -0,0 +1,20 @@
|
|||
defmodule Towerops.Repo.Migrations.IncreaseTimescaledbDecompressionLimit do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
# Increase TimescaleDB tuple decompression limit to unlimited (0)
|
||||
# This is needed for large interface sync operations during device discovery
|
||||
# that can touch 100k+ compressed tuples in a single transaction
|
||||
execute "ALTER DATABASE #{db_name()} SET timescaledb.max_tuples_decompressed_per_dml_transaction = 0"
|
||||
end
|
||||
|
||||
def down do
|
||||
# Restore default limit of 100,000
|
||||
execute "ALTER DATABASE #{db_name()} SET timescaledb.max_tuples_decompressed_per_dml_transaction = 100000"
|
||||
end
|
||||
|
||||
defp db_name do
|
||||
config = Application.get_env(:towerops, Towerops.Repo)
|
||||
config[:database] || "towerops_dev"
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Reference in a new issue