After installing or upgrading to APM 10.1 when using an Oracle database, the following error may appear in Enterprise Manager logs:
[ERROR] [Thread-ModelSynchronization] [Manager.AppMap] Unable to complete model synchronization with storage!
org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT state, start_time, alert_id, vertex_id FROM appmap_states_20151221 WHERE start_time <= ? AND ? = end_time AND alert_id in (?, ?, ?, ?, ?, ?, ?, ?, ?) AND vertex_id in (?, ?, ?, ?, ?, ?, ?, ?)]; SQL state ; error code ; ORA-01000: maximum open cursors exceeded
; nested exception is java.sql.SQLException: ORA-01000: maximum open cursors exceeded
This error occurs because of a change in APM 10.1 to allow App Map to make use of a public REST API.
The REST API requires an additional number of open cursors to be made available to the APM database.
In addition to the open cursors consumed by the database for CEM, Oracle databases have a default value of 50 open cursors.
1) To raise this value and address correct the error, run the following command on the APM Database:
alter system set open_cursors = 1000 scope=both;
2) Restart the EM to allow for the changes to take effect