Running Web Agents Concurrently

I’m trying to determine why a web agent fails when it’s run concurrently even though '‘Run web agents concurrently’ is enabled.

Here are my findings:

A.) When the agent runs once, it completes within 30 seconds.

B.) When the agent runs three times, all runs complete within 30 seconds.

C.) When the agent runs 20 times, half the runs fail and half complete within 3 minutes. On one occasion, this crashed Domino. Topas showed that ‘http’ was using 97 percent of CPU just before the crash.

D.) To identify the cause of the failed runs, verbose variables turned were turned on. The agent was then run 20 times. All runs completed although this took 34 minutes.

I have the following questions:

1.) Is there any reason why all 20 runs of the agent complete only when verbose variables are turned on? Might this suggest a threading issue with the agent?

2.) Does the agent most likely fail from a lack of CPU? If not, is there some other likely cause and how might this be corrected?

Thanks.

Subject: Running Web Agents Concurrently

Shane,

I just want to confirm that when you say “run 20 times” you mean 20 concurrent instances, right?

What resources are you using? Is your agent hitting some external file or db or document that might be a bottleneck?

I would throw some print/messagebox statements in for debugging purposes so that you can track where the time is being spent. You’ll have to put in the user’s name or a unique identifier so that you don’t mix up instance#1 with instance#17, for example.

regards,

raphael

Subject: RE: Running Web Agents Concurrently

Yes, the agents run concurrently.

Yes, there is an external dependency - the agent runs third party software that writes a PDF to the hard drive, then the PDF is attached to a Notes doc by the agent. Logging of the errors shows that when the agent fails, it’s because the PDF is unavailable - this seems to be a threading issue.

A modified version of this agent does not write a PDF to the hard drive and does not fail by encountering this threading issue. However, this raises two additional questions:

1.) The log shows the start and end times of each run. Yet the run times some overlap regardless of whether or not ‘Run web agents concurrently’ is enabled. This does not make sense - I would expect the agents to run serially if ‘Run web agents concurrently’ is not enabled in which case their run times would not overlap at all.

2.) When ‘Run web agents concurrently’ is enabled, the total run elapsed time of the 20 agent runs is about 3 minutes. If the agent runs once, it takes about 30 seconds. What might explain for the additional time of the 20 agent runs. Might it simply be attributed to the use of shared resources or the system being burdened? For example, topas shows ‘http’ uses 97 percent of CPU when there are 20 agent runs.

Thanks very much.

Subject: RE: Running Web Agents Concurrently

Hi Shane

Is there a reason you are doing this via a web agent? ie are your users then redirected to use the pdf that has been created?

If not I would create a transaction queue on the server and process these 1 by 1 server side - and let the web agent continue on its way.

It maybe an issue with the 3rd party solution locking/unlocking etc when it has multple requests thrown at it at the same time.

http://www.stevecastledine.com

Subject: RE: Running Web Agents Concurrently

Hi Steve.

The decision to use a web agent was made by the development team before I joined it. I’m not sure whether they fully considered a solution such as that which you described.

After the PDF is created, the agent attaches it to a Notes doc, then displays a page with the PDF as an attachment.

Would you have any idea on why the agent runs concurrently regardless of whether or not ‘Run web agents concurrently’ is enabled?

Thanks.

Subject: RE: Running Web Agents Concurrently

This should not be the case - are you recycling the http task after you made the change (you might need to do the entire server - I cannot remember)? The setting will only update at that point.

Subject: RE: Running Web Agents Concurrently

Steve … Domino was recycled which should include the ‘http’ task.

You seem to have been correct in your following statement:

“It maybe an issue with the 3rd party solution locking/unlocking etc when it has multple requests thrown at it at the same time.”

Thanks.