Get rid off db_monitor thread and replace it with explicit DB connection