infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Cloverleaf
Load flat files without breaking recovery DB
Yutaka
We're trying to load 94 HL7 flat files ~15-30MB in size. Currently if I load ~120MB worth of files into the inbound thread filepath, it seems like all the messages have to get indexed first, then gets loaded into recovery database. So while it takes some time to output messages on the outbound thread, recovery database gets overloaded and crashes the site. Is there any setting in Cloverleaf where I can dump all the files into the filepath, then Cloverleaf will wait to move onto the next file while one file is loaded in recovery database and is in the process of being processed?
Find more posts tagged with
Clovertech
Comments
Charlie Bursell
Why load all at one time? Use Fileset/Local and you can meter the number of records read and how often
Jeff Dinsmore
When resending a large number of messages, I'll frequently just run a script from a Tcl shell.
I'll loop through messages one at a time - write each message to a temporary file and queue messages with hcicmd using a command something like this:
if { [catch {exec hcicmd -p $process -c "$thread resend ib_pre_tps data 5120 /tmp/requeueFile.txt nl"} err] } { puts "ERROR: $err" }
You need to setsite to the proper site prior to queueing the messages.
To throttle the message flow, I'll insert a sleep for a variable number of milliseconds between each message. The number of msec is read from a file.
I keep track of the last mod time of that file and compare it to current mod time of the file. When the mod time changes, I update the sleep msec between messages. Something like this:
if { [file exists $sleepFilePath] } {
set sleepFileMtime [file mtime $sleepFilePath]
if { $sleepFileMtime > $lastSleepMtime } {
set sf [open $sleepFilePath r]
set tmpSleepMsec [string trim [read $sf]]
close $sf
if { [string is digit $tmpSleepMsec] } {
puts "setting sleepMsec to $tmpSleepMsec"
set sleepMsec $tmpSleepMsec
}
set lastSleepMtime $sleepFileMtime
}
} else {
set sf [open $sleepFilePath w]
puts $sf $sleepMsec
close $sf
set lastSleepMtime [file mtime $sleepFilePath]
}
This allows you to fine-tune the resend rate on-the-fly.
Start off conservative with a second (1000 msec) between messages. Monitor recovery DB queue depth and adjust the sleep time accordingly. Reduce it to send messages faster. Increase it if the queue grows.
As soon as you write a new value and save the file, the script will see the mod time has changed, read the new value from the file and adjust the sleep msec.
After a short tuning time, you'll arrive at a number that sends the messages as quickly as possible, but doesn't result in a recovery DB that grows too large.