› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › Weird Thing
Just wondering if anybody know what this is…
We have a thread listening on TCP/IP that receives messages, translates it to another thread and then pushes to another thread that writes to a directory. We receive about 300 messages a day
The issue is, whenever we restart the Network Monitor for the above process, it seems to queue up all previous messages that have been sent in the past and they go through each thread again. Thus we get duplicates.
Does anybody know what can cause this?
Thanks,
######################################################################
# Name: tps_transfer_msg
# Purpose:
# UPoC type: tps
# Args: tps keyedlist containing the following keys:
# MODE run mode (”start”, “run” or “time”)
# MSGID message handle
# ARGS user-supplied arguments:
#
#
# Returns: tps disposition list:
#
#
proc tps_transfer_msg { args } {
keylget args MODE mode ;# Fetch mode
set dispList {} ;# Nothing to return
switch -exact — $mode {
start {
# Perform special init functions
# N.B.: there may or may not be a MSGID key in args
}
run {
# ‘run’ mode always has a MSGID; fetch and process it
keylget args MSGID mh
set overmh [msgcreate -meta {USERECOVERDB true} [msgget $mh]]
lappend dispList “OVER $overmh”
}
time {
# Timer-based processing
# N.B.: there may or may not be a MSGID key in args
}
shutdown {
# Doing some clean-up work
}
}
return $dispList
}
I’m not saying that is your specific problem but it is possible.
Sounds like you have a handle on that possiblity.
There are some things I want everyone to be aware of to help stay out of other confusing database madness.
Whenever doing any of the following here we require stopping all processes in the site, make sure the database is empty, and shut the site down (stop lock manager) so everything is idle:
– create a new thread
– delete an existing thread
– rename an existing thread
Russ Ross
RussRoss318@gmail.com
We regularly add, delete (seldom change) threads with only stopping the process. Now, if we got some crazy IPC stuff going on, we take a little extra care. But mostly, we make our NetConfig changes, stop the process, save the changes, start the process.
The word opted might be misleading, actually it was more like forced to many smaller sites to better utilize our limited resources and be able to have down time with less impact plus much more seemless upgrades.
Currently I just ran our site/thread counting script and we currently have
68 prodctuion sites with 506 threads altogether (average 7 – 8 threads per site)
and
130 test sites with 784 threads altogether (average 6 threads per site)
Personally I find creating many smaller sites has been one of the best improvements we have done and I could never go back to many threads in larger sites.
Literally, cloverleaf was imploading when we had many threads in larger consolidated sites.
I would like to thank co-worker Jim Kosloskey for helping us to see the light about creating many smaller sites.
Some people would argue against it and say it is a personal preference, but at some point an opinion becomes a fact with enough experience and this is how I feel about numerous smaller sites.
Russ Ross
RussRoss318@gmail.com
Therefore if you have a huge transaction volume, the lock manager does not become the bottle neck.
We’ve gone the route of throwing bigger hardware and SAN drives at the problem. So we stick with the few sites concept. It makes daily support much easier for us.
We are currently running 4 Cloverleaf boxes:
Development – 121 sites – 1021 threads
Testing (QA) – 172 sites – 3762 threads
Production (1) – 132 sites – 2832 threads
Production (2) – 8 sites – 27 threads
The QA and Production(1) environments continue to grow everyday.
As you can see, trying to run with an average of 10 threads per site would create a ridiculous number of sites. The overhead from the monitor daemons alone (without any monitoring) would negate any advantage that this setup ‘might’ create.
Our environments are well monitored and relatively easy to support. Based on our needs, this suits us best.
I don’t disagree that your setup is what works best in your case, but I do disagree that ‘an opinion becomes a fact’.
I’ve spent the past 10 years watching our environment grow from 1 server with 2 sites to what it is today. I can tell you that the way our servers are architected is what works best for us.
Steve
John
John Mercogliano
Sentara Healthcare
Hampton Roads, VA