My Oracle Support Banner

OUD 12c REST API Timeout Error: HTTP 503 Service Unavailable Error (Doc ID 2880761.1)

Last updated on APRIL 19, 2023

Applies to:

Oracle Unified Directory - Version and later
Information in this document applies to any platform.


Oracle Unified Directory (12c) using REST API.

Unable to retrieve a larger resultset for the OUD REST API because the OUD API sends a response as 503 Service Unavailable:


Problem accessing /rest/v1/directory. Reason:

  Service Unavailable

Powered by Jetty:// 9.4.14.v20181114

The user performing the REST API search has been granted access to search and retrieve ~300k users, while the result set is ~200k. There are about ~200K users in OUD matching the search filter.

The LDAP based command line search takes about 145 seconds to return all records with the required attributes.

However, when performing the same search with the user-search REST API, the API times out after 30 seconds and sends an HTTP 503 "Service Unavailable" message.

Since the result-set is large, looking to increase the API waiting time / response timeout value for the OUD REST APIs to a value higher than 30 seconds.

Already reviewed the "timeLimit" query parameter in the documentation:

REST API for Oracle Unified Directory Data Management E98017-02
Section View the Directory Entries

Section Find OUD entries

But it is a timelimit set by the client, and it states that if this attribute is not sent: "If this is not provided, no time limit is imposed by the client."
Tried by setting a value like 900, 9000000, and even without setting a value.
But still the API times out after 30 seconds.

Have no problem in the OUD out-of-the-box API taking more than 30 seconds, so no tuning in needed. Simply need to increase the OUD's default API timeout value so that the backend Jetty server does not close the server after 30 seconds.

Also already reviewed:

Oracle® Fusion Middleware Configuration Reference for Oracle Unified Directory 12c (
REST Web Service Extension
Item Advanced Properties: filter-max-results

REST Server Extension
Item Advanced Properties: lock-timeout

The access log shows:

[01/Feb/2022:20:02:57 -0500] SEARCH RES conn=23 op=1 msgID=2 result=11 message="An unexpected error was encountered while processing a search in one of the Directory Server backends:
NullPointerException( Client Unbind" nentries=162371 etime=29961

The server.out shows:

Feb 01, 2022 8:02:58 PM org.glassfish.jersey.server.ServerRuntime$Responder writeResponse
SEVERE: Error while closing the output stream in order to commit response.
java.lang.IllegalStateException: WRITER
 at org.eclipse.jetty.server.Response.getOutputStream(
 at org.glassfish.jersey.servlet.internal.ResponseWriter.writeResponseStatusAndHeaders(
 at org.glassfish.jersey.server.ServerRuntime$Responder$1.getOutputStream(
 at org.glassfish.jersey.message.internal.CommittingOutputStream.commitStream(
 at org.glassfish.jersey.message.internal.CommittingOutputStream.flushBuffer(
 at org.glassfish.jersey.message.internal.CommittingOutputStream.commit(
 at org.glassfish.jersey.message.internal.CommittingOutputStream.close(
 at org.eclipse.jetty.server.HttpChannel.handle(
 at org.eclipse.jetty.server.HttpConnection.onFillable(
 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
 at org.eclipse.jetty.util.thread.QueuedThreadPool$

found httpOp as null for message id null


Another scenario:

Running Postman Get to list all the user entries, for example:





To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.