From 85e01956f9b639ab19fec6ba720d2502865916f1 Mon Sep 17 00:00:00 2001 From: saint Date: Tue, 20 Aug 2024 11:45:10 +1000 Subject: [PATCH] v0.53 Set to 2 threads for PostgreSQL pool size issue and remonitor. Need to consider memory consumption aspects as well of this after OOM --- gossamer_forums.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gossamer_forums.rb b/gossamer_forums.rb index b11fe7c..17e3d4c 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -1,7 +1,7 @@ # Federated Computer, Inc. # David Sainty 2024 A.D. # Gossamer Threads to Discourse -- Migration-Import Script -# v0.52 Improve handling and look at how we can improve ActiveRecord config for PostgreSQL and avoid insufficient pool size. +# v0.53 Set to 2 threads for PostgreSQL pool size issue and remonitor. Need to consider memory consumption aspects as well of this after OOM. require 'mysql2' require 'open-uri' @@ -1090,7 +1090,7 @@ class GossamerForumsImporter < ImportScripts::Base # Use CachedThreadPool for dynamic thread management #### pool = Concurrent::CachedThreadPool.new ###### pool = Concurrent::FixedThreadPool.new(7) - pool = Concurrent::FixedThreadPool.new(7) + pool = Concurrent::FixedThreadPool.new(2) # Define the connection pool inside the method ###### mariadb_pool = ConnectionPool.new(size: 14, timeout: 100) do