Troubleshooting ORA-4031 Error when Accessing or Upgrading Portal (Doc ID 738833.1)

Last updated on APRIL 17, 2017

Applies to:

Portal - Version 10.1.2.0.2 to 11.1.1.7.0 [Release 10gR2 to FMW11g]
Information in this document applies to any platform.
Checked for relevance on 25-Sep-2014

Symptoms


Error "ORA-04031: unable to allocate 4000 bytes of shared memory" could be displayed in different scenarios, here some of those:


Accessing Portal:

Portal pages show HTTP-404 errors after Portal has been in use for a couple of days.
At the same time, the following error is seen in the OC4J_Portal application.log file:

08/08/24 11:11:06 portal: [module=RepositoryServlet, ecid=89193866793,1] ERROR: Repository Gateway
error: Database Error: ORA=4031 ORA-04031: unable to allocate 4096 bytes of shared memory ("shared
pool","select /*+ rule */ bucket, e...","Typecheck heap","kgghtInit")
ORA-06512: at "PORTAL.WWERR_API_ERROR_UI", line 233
ORA-06512: at "PORTAL.HOME", line 121
ORA-00604: error occurred at recursive SQL level 4
ORA-04031: unable to allocate 4000 bytes of shared memory ("shared pool","select /*+ rule */
bucket, e...","Typecheck heap","seg:kggfaAllocSeg")
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at line 25

The database containing Portal is then restarted which allows Portal to continue working until the same error appears again.


Upgrading Portal

Upgrading from OracleAS Portal 10.1.2.0.2 to 10.1.4.0.0

The upgrade.log file returning the following errors.

### Show errors and warnings
Step started at Tue Feb 2 10:56:41 2010

###
### ERROR: WWU-01013: Upgrade terminated with the following errors:
### 7366 : ERROR at line 1:
### 7367 : ORA-20000:
### 7368 : ORA-20000:
### 7369 : ORA-06512: at "PORTAL.WWPOF", line 440
### 7370 : ORA-06512: at line 47
### 7371 : ORA-06510: PL/SQL: unhandled user-defined exception
### 7372 : ORA-06512: at "PORTAL.WWNLS_API", line 1198
### 7373 : ORA-04031: unable to allocate 4096 bytes of shared memory ("shared pool","select /*+ rule */ bucket_cn...","Typecheck heap","kgghteInit")
### 7374 : ORA-06512: at "PORTAL.WWERR_API_ERROR", line 99
### 7375 : ORA-06512: at "PORTAL.WWERR_API_ERROR", line 222
### 7376 : ORA-06512: at "PORTAL.WWNLS_API", line 1194
### 7377 : ORA-04031: unable to allocate 4096 bytes of shared memory ("shared pool","select /*+ rule */ bucket_cn...","Typecheck heap","kgghteInit")
### 7378 : ORA-06512: at "PORTAL.WWERR_API_ERROR", line 99
### 7379 : ORA-06512: at "PORTAL.WWERR_API_ERROR", line 222
### 7380 : ORA-06512: at "PORTAL.WWNLS_API", line 1194
### 7381 : ORA-04031: unable to allocate 4096 bytes of shared memory ("shared pool","select name,online$,contents...","Typecheck heap","kgghteInit")
### 7382 : ORA-06512: at "PORTAL.WWERR_API_ERROR", line 99
### 7383 : ORA-06512: at "PORTAL.WWERR_API_ERROR", line 222
### 7384 : ORA-06512: at "PORTAL.WWLOG_API", line 278
### 7391 : # ERROR: Error refreshing provider id=888599084
### 7392 : # ERROR: User-Defined Exception
### 7400 : # ERROR: Could not refresh page group providers
### 7401 : # ERROR: ORA-20000:
### 7402 : ORA-06512: at "PORTAL.WWPOF", line 440
### 7403 : ORA-06512: at line 47
### 7404 : ORA-06510: PL/SQL: unhandled user-defined exception
### 7405 : ORA-06512: at "PORTAL.WWNLS_API", line 1198
### 7406 : ORA-04031: unable to allocate 4096 bytes of shared memory ("shared pool","select /*+ rule */ bucket_cn...","Typecheck heap","kgghteInit")
### 7407 : ORA-06512: at "PORTAL.WWERR_API_ERROR", line 99
### 7408 : ORA-06512: at "PORTAL.WWERR_API_ERROR", line 222
### 7409 : ORA-06512: at "PORTAL.WWNLS_API", line 1194
### 7410 : ORA-04031: unable to allocate 4096 bytes of shared memory ("sh
### 7419 : ### ERROR: Exception Executing upg/10140/posttrge/rfrsprvd.sql for Subscriber: 1
###
>>> Running /export/appl/u001/app/oid/DevOIDHome/upgrade/temp/portal/tmp/popinv.sql

 

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms