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

This commit is contained in:
David Sainty 2024-08-20 11:45:10 +10:00
parent 5735b78dc7
commit 85e01956f9

View File

@ -1,7 +1,7 @@
# Federated Computer, Inc. # Federated Computer, Inc.
# David Sainty <saint@federated.computer> 2024 A.D. # David Sainty <saint@federated.computer> 2024 A.D.
# Gossamer Threads to Discourse -- Migration-Import Script # 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 'mysql2'
require 'open-uri' require 'open-uri'
@ -1090,7 +1090,7 @@ class GossamerForumsImporter < ImportScripts::Base
# Use CachedThreadPool for dynamic thread management # Use CachedThreadPool for dynamic thread management
#### pool = Concurrent::CachedThreadPool.new #### pool = Concurrent::CachedThreadPool.new
###### pool = Concurrent::FixedThreadPool.new(7) ###### pool = Concurrent::FixedThreadPool.new(7)
pool = Concurrent::FixedThreadPool.new(7) pool = Concurrent::FixedThreadPool.new(2)
# Define the connection pool inside the method # Define the connection pool inside the method
###### mariadb_pool = ConnectionPool.new(size: 14, timeout: 100) do ###### mariadb_pool = ConnectionPool.new(size: 14, timeout: 100) do