v0.48.8 efforts to deal with MySQL connectionf failure issue
This commit is contained in:
parent
a34885141b
commit
f43bdcd462
Binary file not shown.
@ -1132,11 +1132,11 @@ 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(20)
|
pool = Concurrent::FixedThreadPool.new(12)
|
||||||
|
|
||||||
# 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
|
||||||
mariadb_pool = ConnectionPool.new(size: 20, timeout: 100) do
|
mariadb_pool = ConnectionPool.new(size: 24, timeout: 100) do
|
||||||
Mysql2::Client.new(
|
Mysql2::Client.new(
|
||||||
host: "slowtwitch.northend.network",
|
host: "slowtwitch.northend.network",
|
||||||
username: "admin",
|
username: "admin",
|
||||||
@ -1154,7 +1154,7 @@ class GossamerForumsImporter < ImportScripts::Base
|
|||||||
parent_post_ids = result.map { |row| row['post_id'] }
|
parent_post_ids = result.map { |row| row['post_id'] }
|
||||||
|
|
||||||
# parent_post_count = parent_post_ids.count
|
# parent_post_count = parent_post_ids.count
|
||||||
batch_size = 30 # Set our batch size for number of posts to import in a single batch
|
batch_size = 10 # Set our batch size for number of posts to import in a single batch
|
||||||
|
|
||||||
#### current_post_batch = 0 # Set our current batch number. This tracks the current batch of posts being processed.
|
#### current_post_batch = 0 # Set our current batch number. This tracks the current batch of posts being processed.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user