cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5425
Views
10
Helpful
11
Replies

CPO - Question - How to kill a long running process

Hello Cisco Community,

 

I'm very new to CPO and I would like to know how to kill a long running process that seemingly has no end, or has gotten stuck.

 

Does CPO have a solution to this from either Server / Client side?

 

If it doesn’t, what alternatives do I have to free up the memory that my server might be consuming?

 

Thank you,

Jonathan Gil Santillan

11 Replies 11

Tuan Tran
Cisco Employee
Cisco Employee

Hi Johnathan,

Are you talking about CPO process or Operating System (Windows) process?   If you are talking about CPO process, you can see a list of running instances in one of the Operations view.  You can right click on a running process instance to cancel it.

-Tuan

Hi Tuan,

Thanks for your reply and i mean a CPO Process.

Is there a way to automatically shut down a process if it seems to be not responding after a while, like some kind of timeout?

Thanks,

Jonathan

Hmm...   Here is an idea that just pops up.  Give it a try to see if works. :)

(I'll build a community automation pack for it once I get a chance)

  • Have a workflow to monitor for "Process Started" trigger and create a change request.
    • Package the process instance Id (of the started process) in the change request so we can terminate it if needed
    • Set the change request to expire after a certain amount of time
  • Have a second workflow to monitor for "Process Succeeded or Process Failed" triggers
    • Look up the change request that has the process Id (of the succeeded process or failed process) and close the change request
  • Have a third workflow monitor for any expired change request
    • Pull out the process instance Id from the change request
    • Run REST API to terminate the process instance
  • What if you only to monitor & terminate a certain group or processes only?
    • An easy solution is to put those processes into an automation pack
    • Then, add criteria to the triggers above to only trigger for processes belonged to this automation pack.

Good luck

-Tuan

Thank you Tuan, i'll look into this.

Johnathan,

I monitor this forum and provide any help I can.

If you have more questions, please post it here.  It will allow others to help as well.

-Tuan

tuatran2@cisco.com

I was wondering if you would please help me with a step-by-step guide on how to stop long running processes?  i wasn't very successful using your idea.

I just made a dummy process that will last a long time and i would like to know how to stop it via some trigger from another process.

Also, how would i obtain the id from this long running process?

Thanks

Jonathan Gil Santillan

I'll try to produce a TAP for you.  I'm running PO 3.4.  Do you have an environment running version 3.4 to import the sample TAP?

-Tuan

That would be incredibly useful to me, thank you.

Yes, i'm running this version:

-J

Here is the TAP file to illustrate the idea I posted above.  I've run very limited testing on it.

I have a global variable to indicate the timeout value.  If a process is running long than that number of seconds, it will be terminated.

Currently, the triggers are configured to monitor for processes with the name starts with "Long Running Process".

Thank you Tuan,

I'll look into it!

-Jonathan Gil Santillan

Hi Tuan,

Would you please share your e-mail with me?

Thanks

Review Cisco Networking for a $25 gift card