Troubleshooting Unresponsive Channels

Introduction

Sometimes when you attempt to stop an Iguana channel using the Stop button it becomes unresponsive (or  “hangs”), and the status of the channel remains in the amber (pending) state and it never actually stops. This prevents the channel from being restarted, and typically means that  the entire Iguana service (daemon) has to be restarted — which is disruptive for other channels on the Iguana Server.

There are two possible causes that would cause an Iguana channel to hang:

  1. Long-standing web service requests.
  2. Hung database connections.

This is not an issue with Iguana itself, but rather Iguana is waiting for an external process to return a response before shutting down the channel. Iguana will always wait until all threads for a given channel are completed before shutting down the channel (to allow the channel to shutdown cleanly).

With the release of Iguana version 6.1 we introduced a feature that allows you to force a channel to stop (this feature is not available before Iguana 6.1).

Note: If an Iguana channel has stopped processing messages due to some external process hanging, then attempting to stop the channel by clicking on Stop will result in the channel hanging (becoming unresponsive).

This is because the hanging external process will prevent the channel from shutting down.

Issue [top]

Sometimes an Iguana channel will become unresponsive (or “hang”) when you try to stop it — this is indicated by the channel getting stuck in the amber/pending state instead of stopping.

Solution [top]

Ideally the root cause of this issue should be identified and addressed so that this issue does not happen again!

When a channel hangs you will need to force the channel to restart, there are two ways to do this:

  • For Iguana version 6.1 or later you can force the channel to stop
  • Before Iguana 6.1 you will need to restart the Iguana Server (service or daemon)
    Note: If the channel is not critical you may prefer to wait till after hours before restarting (to minimize disruption to other channels)

Note: With the release of Iguana version 6.1 we introduced a feature that allows you to force a channel to stop (this feature is not available before Iguana 6.1). Force Stop should be used sparingly as a “force-stopped” channel does not shut down cleanly — which causes the Iguana Server to gradually start using more memory (because memory used by abandoned threads is usually not recovered until the Iguana Server is restarted). Therefore if you do need to use Force Stop regularly you should restart your Iguana Server periodically during off-peak hours (the restart could be scheduled to run automatically so it is not forgotten).

Prevention [top]

Ideally the root cause of this issue should be identified and addressed so that this issue does not happen again! In many cases you can code around problems by including retry logic in your code (there are several other articles you can find by searching for “retry”).

These are some common issues that you may need to address:

  1. Firewall issues:
    • The firewall can interfere with the web service responses.
    • The firewall can interfere with the database responses.
  2. Intermittent problems with network resources:
    • Web services or databases can go down temporarily.
    • Web services can be temporarily overloaded.
    • Web services can use resource throttling, that can limit things like: number of logins, requests, and data volume per hour etc.
    • Unreliable networks will also cause web requests and database connections to hang or timeout.

Note: Unfortunately fixing some issues may not be possible as the cause of the issue is beyond your control. This could be external issues like intermittent/unreliable network connectivity, or unreliable web services and databases. In these cases you can often code around this by including appropriate retry logic in your code (there are several other articles you can find by searching for “retry”).

More Information [top]

Leave A Comment?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.