Modifying ORDS Jetty Parameters

Recently we were working on an issue that was occurring to developers in Oracle Application Express’s (APEX) Page Designer. When we would attempt to validate or save changes in a PL/SQL block, the progress indicator spinner would spin for some time until we finally got a response back. The issue was it was not actually performing the validation or saving the changes.

What I’m about to demonstrate was not the solution to our problem but helped us in our troubleshooting effort. More importantly it was sifting through the documentation and blog post from our Oracle product managers that helped us to modify the Jetty parameter.

Version Considerations

Oracle Application Express (APEX) 23.2

Oracle Rest Data Services (ORDS) 23.4

Problem

As I mentioned, we were having issues performing a validation or save in APEX. Some additional details about our issue. It only happened to APEX developers that were on our VPN. Those that were on an office network, had no issues. We knew that being on the VPN was causing the issue. We didn’t know exactly why yet. Initial thoughts were along the lines of VPN using different network routes to get to our application server. Another possibility was our firewall didn’t like something about the network traffic that it was receiving.

What’s the deal?

Using our browser developer tools (F12) we could see an error appearing in the network tab. We found an associated error message logged in the ORDS server log. For some additional context, we use ORDS standalone which is using the embedded Jetty server behind the scenes. The error we found was as follows.

Solution

From the error message, I could see that we were hitting a timeout limit. The thought was maybe increasing the timeout might allow us to gather or eliminate some things. First I was trying to understand was this timeout setting an ORDS configuration or possibly a Jetty one. I discovered that it was a Jetty setting based on some research. The setting in Jetty is called jetty.http.idleTimeout. The is set to 30000 ms (30 seconds) by default. It matches what we see in our ORDS log.

To update this parameter, when using ORDS standalone, the following was done.

  1. Create a new set of sub-directories under $ORDS_CONFIG/global/. Like this, $ORDS_CONFIG/global/standalone/etc.
  2. Create a file called jetty-http.xml in this directory.
  3. Modify the jetty-http.xml file to have the entry below.
  4. Restart the ORDS server.

Jetty HTTP Entry for Idle Timeout

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
  <Set name="idleTimeout">90000</Set>
</Configure>

Finally, I executed another test of our issue. While it didn’t resolve the issue, it demonstrates that the timeout limit did indeed increase to 90 seconds. Here we can see that in our ORDS log.

2024-05-25T12:27:55.772Z SEVERE      <U0nGm39FtFr9__tixkhjJQ> POST server.domain.com /ords/wwv_flow.ajax?p_context=app-builder/page-designer/4223678465914500 An unexpected error with the following message occurred: java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 90000/90000 ms

Summary

In conclusion, while this setting didn’t resolve our issue it did help to eliminate some things in our troubleshooting effort. This all looks pretty straightforward but it took some digging in both the Oracle documentation and Jetty documentation to determine how to modify this parameter. The biggest hurdle was I couldn’t figure out what the configuration file name should be! A big help were two blog post by the Oracle Product Management team, Jeff Smith and Kris Rice. This team consistently puts out content to help users like myself. I’ll link those below.

References

https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/23.4/ordig/miscellaneous-configuration-options-of-ORDS.html#GUID-A3798C5A-C6C6-40A2-826F-CE1CF0B8DDE2

https://www.thatjeffsmith.com/archive/2017/06/configuring-jetty-in-standalone-ords

https://krisrice.io/2017-01-12-how-to-add-ncsa-style-access-log-to

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.