We're running Tomcat+ORDS against our APEX application.
During the afternoon the customer reported getting HTTP 503 errors from ORDS saying that the pool couldn't get a connection from the datasource due to "ORA-65162 The password has expired".
On checking the database we find that the APEX_PUBLIC_USER password has expired. We reset the password to the original value and are able to reconnect to the application.
Some hours later, the customer reports getting HTTP 500 errors from ORDS but there is either no supporting message or the customer forgets to record it.
On checking the Tomcat logs we can see messages starting:
08-Jan-2016 02:41:35.418 SEVERE [http-nio-8443-exec-20] oracle.dbtools.http.errors.ErrorPageFilter.log JDBCException [kind=UNAVAILABLE]
InternalServerException [statusCode=500, reasons=]
Caused by: java.sql.SQLException: Exception occurred while getting connection: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource: java.sql.SQLException: ORA-65162: The password has expired.
We recheck the database and the password has *not* expired. We restart Tomcat and are able to access the application.
So... a couple of queries...
1. Why did we get a HTTP 503 and 500 for the same underlying cause?
2. Why did we get the second set of 'spurious' errors? Was part of the connection pool still under the impression that the password had expired?
3, Should we be looking at any possible causes?
Refer to a similar thread : Re: Re: 503-service unavailable error after deploying apex listener on glassfish
Post a detailed debug log as mentioned in above post to understand the root cause.
Also, are you using Oracle DB 11g or later? If yes this issue will arise due to the password expiry feature of the DB User Profile. To avoid this issue in future, check the profile of the above mentioned DB users and grant password lifetime as unlimited for this user profile.