ORA-04031 unable to allocate X bytes of shared memory when starting application
This Knowledge Base article was written specifically for the Atlassian Server platform. Due to the Functional differences in Atlassian Cloud, the contents of this article cannot be applied to Atlassian Cloud applications.
Application fails to start and following appears in the daily log file.
CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:oracle:thin:@//DB_URL:1521/bitbucket, username = BITBUCKET. Terminating connection pool. Original Exception: ------ java.sql.SQLException: ORA-04031: unable to allocate 12312 bytes of shared memory ("shared pool","unknown object","ABC123","abc123")
More shared memory is needed than was allocated in the shared pool.
Consult with your DBA to increase the size of the shared memory in the pool. This can usually be done by increasing the value of