When toggling between single-threaded Post (STP) and multi-threaded Post (MTP), one runs into the following errors in event_log:
07/01/09
15:58 Process exited sp_opst (for o.SID1-o.ODSUP queue queue_name) [pid = 2163] - exit(1)
07/01/09 15:58 Error: 15007 - Can't open poster queue que_SHS_ERROR: Error returned by a statistics module function . [sp_opst (for o.SID1-o.SID2 queue queue_name)/2163]
event_log (30/60)
07/01/09 15:58 Error: shs_get_stat for queue_name+P+o.SID1-o.SID2+PP+queue_name+sp_opst+o.SID1-o.SID2 : shs_NOTFOUND: requested statistic does not exist [sp_opst(que)/2163]
07/01/09 15:58 Notice: Oracle env - SID2:/SID2/oh/102 [sp_opst(pdb)/2162]
07/01/09 15:58 Process launched: sp_opst (for o.SID1-o.SID2 queue queue_name) [pid = 2163]
The show output shows the following errors indicating that multiple Post processes for the same named Post queue have been spawned, one of which is single-threaded Post and the other one is multi-threaded Post. Further, one out of the two redundant Post processes (for a given named Post queue) are stopped due to error:
sp_ctrl (name:2400)> show
Process Source Target State PID
---------- ------------------------ ------------ -------------------- ------
Import name name Running 3545
MTPost o.SID1-queue_name o.SID2 Stopped by user
Post o.SID1-queue_name o.SID2 Stopped - due to error
The paramdb entry for the problem Post queue indicates that currently it is configured to run in multi-threaded mode as seen from the setting of SP_OPO_TYPE to 1:
cat $SP_SYS_VARDIR/data/paramdb
.
.
SP_OPO_TYPE.queue_name+O.SID1-O.SID2 "1" # poster type 0 = single-threaded, 1 = multi-threaded
During switching between STP and MTP, a runaway process for STP exists and is interfering with normal running of Post.
During switching between STP and MTP, one of the processes did not get removed. For a given named Post queue, there can only be one process active at any point in time. In this example, the STP process should not be existing and needs to be removed. The reverse can be true if the paramdb indicates that the mode of Post is STP and the STP process is found to be in a state of error.
The runaway STP process can be removed by using deluser command in qview utility (located in /proddir/bin directory) as:
1. Shutdown Shareplex.
2. Invoke qview and run deluser as:
/proddir/bin ./qview -i
qview>list
queue_name+P+o.SID1-o.SID2
subqueues range from 0 to 6746
WRITER +PI+queue_name+sp_mport+0xnnnnnnnn (111.11.111.110)
READER +PP+queue_name+sp_opst+o.SID1-o.SID2
READER +PP+queue_name+sp_opst_mt+o.SID1-o.SID2
.
.
qview> deluser queue_name+P+o.SID1-o.SID2 +PP+queue_name+sp_opst +o.SID1-o.SID2
qview>exit
3. Restart Shareplex and Post.
To prevent the issue from occurring in future while toggling between STP and MTP, make sure that the process is "stopped by user" and not "stopping" before making a switch. See SOL33386 for details.