Gopi Desaboyina Solaris Blogs

Just another weblog

ORA-04030: out of process memory when trying to allocate 840 bytes (kgsp-heap,kglss)

Recently we fully populated our Sun Fire E2900 from 2 CPU boards to 3 CPU Boards ( 12 Processors & 96 GB RAM).

After that we increased oracle SGA size to more than 12 GB for some of the instances.

Bam..that’s it !!!  They never come up or sometimes they come up and as soon as we issue any sql commands they gets killed. we saw below errors in alert logs

“ORA-04030: out of process memory when trying to allocate 840 bytes (kgsp-heap,kglss)”

Oracle Version is

Googling that error which came with link which I helped us and also confirmed from metalink.

based on CPU count and which leads to error.

As per investigation made in these bugs, the issue is caused by the fact that the granule size automatically chosen at startup is too large and we ran out of granules. It is not factored that we may want to subdivide some of the components into multiple chunks (typically based on directly or indirectly on cpu_count). For example: the shared pool may split into multiple subpools and the buffer cache into multiple working sets. Hence we may choose a granule size which is too large to cater for the fact that some of the components may require multiple granules.


we’ve fixed the issue by using _ksmg_granule_size=16777216 # ( 16 MB ) in init.ora [OR] as per metalink you could apply the patch 8813366 & 7441663.

See MetaLink Note # 831770.1 for details.


Reference Links on Oracle Shared Pool :


December 4, 2009 - Posted by | Oracle |


  1. Glad my blog helped. It is a bit of an odd one because with 96Gb of memory you don’t expect to be short of memory do you


    Comment by John Hallas | December 4, 2009 | Reply

  2. Yes. you are right we do have lot of free memory still it was throwing that error. simple search with that error in metalink points to increase shared memory etc. fortunately your blog helped me as our problem also same.

    Comment by Gopi | December 4, 2009 | Reply

  3. Wonderful sharing problem solution of ORA-4030. Is there any other reason for same error?

    Comment by Jack Nicholson | October 11, 2010 | Reply

  4. […] ORA-04030: out of process memory when trying to allocate 840 bytes (kgsp-heap,kglss) December 20093 comments 5 […]

    Pingback by My Blog 2010 in review « Gopi Desaboyina Solaris Blogs | January 2, 2011 | Reply

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: