Honored Contributor.. Anthony Dalferr Honored Contributor..
Honored Contributor..
169 views

Possibility of creating a schedule record to stop and restart a background scheduler

We have started to have a situation where our email service, using SMTPmail, has started to backup and stop sending emails.  We have encoutered no apparent issues being reported in our logs.  The only indication that there is an issue is shown in System Status, SMTPMail become idle and never goes back to read the eventout queue.  I can also not stop the process.  Everytime I attempt to use the k command to kill the connection, the command never executes and SMTPMail stays active but idle.  Only way to clear that process is to issue a full restart.

 

 

I suspect there could be an issue somewhere with our internal servers but I have been unable to pinpoint anything to really point in that direction.  The only common thread we have discovered is that the issue has constantly been happening around 3 am, but not every day.

 

In the mean time while we try and troubleshoot this issue, I thought of somewhat of a workaround but not sure if it is possible.

 

Is there a way to create a schedule record or something, that would go look at system status, if it sees this process, idle for more than 1 minute, attempt to stop the process, then start a new one.

 

We are currently running on SM9.30.282 on Windows 2008 R2.

0 Likes
8 Replies
Carlos_V_SM Acclaimed Contributor.
Acclaimed Contributor.

Re: Possibility of creating a schedule record to stop and restart a background scheduler

Hello Anthony.

 

Hope you are doing fine.

 

I am not completily sure if there is an automatically workaround able to complete the process you mentioned before, instead of that if you cannot kill the process with the "k" command my suggestion will be the next one in order to restart it:

 

Parameter: restart

Startup parameters change the behavior of the HP Service Manager server. You can always set a startup parameter from the server's operating system command prompt.

Parameter

restart

Description

This parameter restarts one or all HP Service Manager processes on a host after a specified waiting period and an optional quiesce grace period. This parameter uses the following syntax:

sm -restart:n [-host:host name or IP address] [-pid:process ID]

Use the host parameter to specify where the processes are located if they are not on the local system. If you do not specify a host, the server will restart processes on the local host. Use the pid parameter to specify a particular process ID you want to restart if you do not want to restart all processes on the host. If you do not specify a process ID, the server restarts all processes. Add restartGraceInterval to the sm.ini file to specify how many minutes you want to quiesce processes before they restart.

Note: The restart command does not restart the load balancer process when restarting all processes on a host. The only way to restart a load balancer process is to specify it by process ID.

You can cancel a restart by using a value of -1 during the waiting period. You must specify the same host name or process ID you specified to restart. For example:

sm -restart:-1 -pid:1234

Note: You cannot cancel a process restart after the restart waiting period has expired.

Valid if set from

Server's operating system command prompt

Requires restart of the Service Manager server?

Yes

Default value

0 minutes

Possible values

n (restart in n minutes)

0 (restart immediately)

-1 (cancel restart)

Example usage

Command line: sm -restart:10 -host:myserver.myhost.com -pid:1234

Carlos Villalobos R
Customer Support Engineer
If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
Carlos_V_SM Acclaimed Contributor.
Acclaimed Contributor.

Re: Possibility of creating a schedule record to stop and restart a background scheduler

Example: Restart one process

 

The following example illustrates how to restart one processes on a Service Manager host because it is running consuming a high amount of system resources. This scenario uses the following system configuration:

System property                                                                 Value

Number of hosts                                                                        3

Total Service Manager processes                                      21

Threads per process                                                               40

Maximum number of concurrent users expected     700

Maximum user capacity                                                      840

 

This horizontally scaled configuration can support 700 concurrent users with an extra 20% capacity to handle high usage and outages.

Problem

The system administrator notes that one Service Manager process is consuming a large amount of system resources such as CPU time or system memory.

Recommendation

While the root cause of the issue is being determined, the system administrator can schedule the restart of theService Manager process. Restarting the process will temporarily free up system memory until the next system maintenance down time or until the root cause of the problem is identified and fixed.

The administrator uses the following command to restart the affected process:

sm -restart:0 -host:15.80.177.12 -pid:3433

This command causes process ID 3433 on the identified host to restart immediately. To provide the currently connected users time to save their work, the administrator adds the following parameters to the sm.ini file:

restartGraceInterval:15

The restartGraceInterval:15 value ensures that users on the Service Manager process have 15 minutes to save their work and re-login before the process restarts. Users who log off one process can immediately re-login and continue work on another available process.

Note: A host restart command does not restart the load balancer process. The only way to restart a load balancer process is to specify it by process ID. The system cannot accept new connection requests until after the load balancer process restarts.

Carlos Villalobos R
Customer Support Engineer
If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
Honored Contributor.. Anthony Dalferr Honored Contributor..
Honored Contributor..

Re: Possibility of creating a schedule record to stop and restart a background scheduler

Thanks Carlos for the response. 

As of right now, we have the following line in our CFG to start email,

sm -emailout -clean


So, for example if I look at the current system status, and I find the SMTPMail user name, I see the PID of 3344, with the following other user names connected to it,

TRCLIENT_SEQUENCENUMBER

TRCLIENT

ThreadControllerId-background

 

So, from that server where the process should be running, I would issue the following command from the root of the run directory

sm -restart:0 -host:<HostName> -pid:3344

 

Would that take into account the parameters that were already based in from the CFG?

 

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Possibility of creating a schedule record to stop and restart a background scheduler

Anthony,

 

Your problem with the SMTPMail process matches this reported issue:

 

QCCR1E88930 JAVA MAIL frequently freezes, which causes the eventout table to fill with unsent email

 

which is fixed in RTE patch 9.30 P5 HF8.  If you open a support case they will be able to get you that exact hotfix or you obtain one of the latest patches like 9.33, 9.34, 9.35 from the HP support site.

 

There are methods to 'kill' the session using JavaScript but they perform the same as the 'k' command so if that did not work then the JavaSript approach would not work either.

Carlos_V_SM Acclaimed Contributor.
Acclaimed Contributor.

Re: Possibility of creating a schedule record to stop and restart a background scheduler

Hello Anthony.

 

The command "restart" will restart all the processes related to the same PID as you mentioned before, the command sm -emailout -clean I think won't be affected by the command restart.

 

I hope this help you.

Carlos Villalobos R
Customer Support Engineer
If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
Honored Contributor.. Anthony Dalferr Honored Contributor..
Honored Contributor..

Re: Possibility of creating a schedule record to stop and restart a background scheduler


@swhirschfeld wrote:

Anthony,

 

Your problem with the SMTPMail process matches this reported issue:

 

QCCR1E88930 JAVA MAIL frequently freezes, which causes the eventout table to fill with unsent email

 

which is fixed in RTE patch 9.30 P5 HF8.  If you open a support case they will be able to get you that exact hotfix or you obtain one of the latest patches like 9.33, 9.34, 9.35 from the HP support site.

 

There are methods to 'kill' the session using JavaScript but they perform the same as the 'k' command so if that did not work then the JavaSript approach would not work either.


 

 

 

I don't know if that is exactly the same issue.  I wouldn't say the process freezes, it just becomes idle.  if it were a freeze, I would suspect it would stay running with an idle time of 00:00:00.

 

 

And this is a fairly recent issue.  This just started to happen maybe about 2 months ago where we have been using the process for over 2 years with no issues like this before.

 

But I will reach out to support an see.

0 Likes
Honored Contributor.. Anthony Dalferr Honored Contributor..
Honored Contributor..

Re: Possibility of creating a schedule record to stop and restart a background scheduler


@CharlieV wrote:

Hello Anthony.

 

The command "restart" will restart all the processes related to the same PID as you mentioned before, the command sm -emailout -clean I think won't be affected by the command restart.

 

I hope this help you.


I guess the best thing would be to try it and see what happens.

0 Likes
TomPowe Acclaimed Contributor.
Acclaimed Contributor.

Re: Possibility of creating a schedule record to stop and restart a background scheduler

I don't think they completely fixed the issue. We have RTE 9.34.xxxx and sm -emailout still freezes up sometimes, and the eventout table fills up. I restart fixes it.
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.