MOCA Server or Web API Step Timeout Error on Long Running Command

MOCA Server or Web API Step Timeout Error on Long Running Command

You may see the error message below in your tests if you have a MOCA command or a Web API step that takes longer than 60 seconds to complete. 

This error message is due to Cycle expecting a response from the MOCA server or the Web API endpoint within 60 seconds of sending the command. If the MOCA server or Web API endpoint has not responded within the default 60 seconds, Cycle will fail the step. 

This default 60 second response time can be extended using a configuration file. Please note that this timeout configuration update will apply to all steps expecting a server response.

To extend the default timeout period follow the steps below on the device where Cycle is running:

1. Create a new file called "akka-config-overrides.conf" in the directory "C:/Users/<your-user>/AppData/Roaming/Cycle/config"

C:/Users/<your-user>/AppData/Roaming/Cycle/config/akka-config-overrides.conf

2. Copy and paste the contents below in bold text into the file.
Please note that the uncommented example will extend the timeout to 5 minutes.
There are also commented examples to show how to adjust the time in seconds or to apply an infinite timeout period.
You can set the value of "akka.http.host-connection-pool.client.idle-timeout" according to the needs in your environment.
File contents:

# this will keep http connections open up to 5 minutes when receiving no data.
akka.http.host-connection-pool.client.idle-timeout = 5 min

# or you can specify time in seconds
# akka.http.host-connection-pool.client.idle-timeout = 180 s

# or you can keep connections open indefinitely
# akka.http.host-connection-pool.client.idle-timeout = infinite
3. Restart Cycle. 
    • Related Articles

    • How to use Web API steps

      Web API steps introduced in Cycle 2.5 can be used to send HTTP requests to exposed web API endpoints. The Cycle Web API steps support POST and GET request methods using the JSON data format. Cycle also includes steps for handling HTTP responses ...
    • Can Cycle execute MOCA and Local Syntax?

      Problem Cycle Features built to interact with and test the JDA WMS need to run queries, execute statements and perform validations directly against the database. Solution JDA WMS provides a framework to ease database interaction called MOCA. Cycle ...
    • "Unexpected 302 status code received from MOCA server."

      Problem I receive the error: "Unexpected 302 status code received from MOCA server." while trying to connect to a JDA WMS cloud instance in Cycle. Solution This error occurs when the cloud URL is used without /service on the end of the connection ...
    • How to configure Blue Yonder WMS to record Cycle's MOCA executions in the System Auditing table

      Problem With a MOCA connection Cycle can perform many functions in the WMS including executing MOCA commands and making local syntax calls. While these commands and calls are usually necessary for test automation, Cycle is an external application ...
    • "Unexpected error occurred communicating with MOCA server: General SSLEngine problem."

      Problem I receive the error: "Unexpected error occurred communicating with MOCA server: General SSLEngine problem." while trying to connect to a JDA WMS instance in Cycle. Solution This error occurs when there is an issue with SSL validation. Cycle ...