0

I have several scenarios when I need to stop the Notes Agent running. For example, the Agent may get into an infinite loop, or wait indefinitely for an external request to execute. I have tried running the commands :

  • tell amgr quit (for Agents running amgr),
  • tell http quit (for Agents started via http request). But in any case Agents keep on running and only rebooting Domino server helps.

Is there any way to stop running Agents? The question concerns Agents written both in LotusScript and Java.

Ilya Skaba
  • 55
  • 1
  • 9

2 Answers2

2

In my experience, 'tell amgr quit' and 'tell http quit' usually do work. But only usually. They can hang if the agent itself has made a network call and is waiting for a response. And obviously, they have the drawback of shutting down a lot more than just a single agent.

Apart from that, no, I am not aware of any way to shut down an agent unless you explicitly code it to check something on every N iterations of each major loop. It has to be something that wouldn't be cached, though, so it's going to be expensive, which means you'd better make your N pretty big.

Richard Schwartz
  • 14,463
  • 2
  • 23
  • 41
1

If the agent was manually triggered with command

tell amgr run "db name" 'agent name'

You can try the command

tell amgr cancel "db name" 'agent name'

Otherwise as you said before, you can try to restart the amgr/http tasks.

But if the agents still hangs, then I confirm there is no other way than to restart the server - and in the worst cases you may even have to kill the process yourself.