KB-1159 "Could not obtain 3 thread(s) after X attempts in work poller" error printed in application server log

Symptoms

The following error is displayed in the application server log:

[Appian WorkPoller - x [<engine>] (originally: <thread name>)] ERROR com.appiancorp.process.workpoller.WorkPoller - Could not obtain 3 thread(s) after X attempts in work poller

Cause

The application server allocates up to 30 work poller threads to receive and process work from the Appian engines. This issue occurs when all 30 work poller threads are in use, preventing the engines from sending new work to the application server.

Action

To resolve the issue, perform the following:

  1. Capture thread dumps while the behavior is ongoing:
    1. Determine the process id of the application server process:
      For JBoss: ps -ef | grep standalone
      For Tomcat: ps -ef | grep bootstrap
    2. Capture multiple thread dumps using the instructions in KB-1177.
  2. Restart the application server.
  3. Analyze the thread dumps to determine the cause of the long running Appian Work Item threads.

The usual culprits are:

  • Looping functions
  • Unresponsive or slow external servers (database, mail server, or other integration)
  • Long running calls from custom plugins

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: January 2021

Related
Recommended