Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-04030 out of proces memory

Re: ORA-04030 out of proces memory

From: EdStevens <quetico_man_at_yahoo.com>
Date: 3 Oct 2006 14:18:07 -0700
Message-ID: <1159910287.629662.56310@m7g2000cwm.googlegroups.com>

romanhodain_at_email.cz wrote:
> EdStevens napsal:
> > romanhodain_at_email.cz wrote:
> > > Hi,
> > > i read several discusion interested in this problem but did not find
> > > solv my problem.
> > >
> > > I have Oracle 10g R2 on windows 2003 with 4G MB RAM.
> > > My SGA target is set to 700MB
> > > My PGA target is set to 1GB
> > >
> > > workarea_size_policy is AUTO
> > >
> > > I have 2 instance of Oracle. Instance NMCRL and MCAT. In instance MCAT
> > > is created synonym and db link to instance NMCRL. Our aplication is
> > > connected in MCAT and aplication inserting very mauch items to table in
> > > NMCRL. It is about 40 000 000 items. When the import is in about 50%,
> > > the anothe queries fall down with error ORA-04030 out of proces memory.
> > > For example:
> > >
> > >
> > > z.aura.core.message.DefaultExceptionHandler handleException
> > > SEVERE: Zachycena chyba v exception handleru
> > > org.springframework.jdbc.UncategorizedSQLException:
> > > PreparedStatementCallback; uncategorized SQLException for SQL [select
> > > kcch6.Id_kcch6, kcch6.cnaz, kcch6.Id_kcch6 idKcch6,
> > > kvysvc_supopis.vysvetc vysvetcSupopis, kcch6.inc inc, kcch6.dzcnaz
> > > dzcnaz, kcch6s_su.cc ccSu, kcch6.kstnaz kstnaz, kcch6s_su.kprelh6
> > > kprelh6Su, kciig_suig.kIIG kiigSuig, kcch6.tnaz tnaz,
> > > kcstnaz_mast.kstnaz kstnazMast, kcch6.cn cn, kcch6.cnaz cnaz,
> > > kcsppol_supsp.ksppol ksppolSupsp, kcch6s_su.app appSu, kcch6s_su.nazpol
> > > nazpolSu, kvysvc_suap.vysvetc vysvetcSuap from kcch6 kcch6 LEFT OUTER
> > > JOIN (kcch6s kcch6s_su LEFT OUTER JOIN kciig kciig_suig ON
> > > kcch6s_su.kiig=kciig_suig.kIIG LEFT OUTER JOIN kcsppol kcsppol_supsp
> > > ON kcch6s_su.ksppol=kcsppol_supsp.ksppol LEFT OUTER JOIN kvysvc
> > > kvysvc_suap ON kcch6s_su.i_id_kvysvc=kvysvc_suap.Id_kvysvc LEFT OUTER
> > > JOIN kvysvc kvysvc_supopis ON
> > > kcch6s_su.id_kvysvc=kvysvc_supopis.Id_kvysvc) ON
> > > kcch6.Id_kcch6=kcch6s_su.id_kcch6 LEFT OUTER JOIN kcstnaz kcstnaz_mast
> > > ON kcch6.kstnaz=kcstnaz_mast.kstnaz, kcch6 K100_0_1 where kcch6.tnaz in
> > > (?,?,?) and kcch6.Id_kcch6 not in
> > > (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
> > > and K100_0_1.Id_kcch6 = kcch6.Id_kcch6 and ROWNUM <= 1000 order by
> > > kcch6.cnaz]; SQL state [61000]; error code [4030]; ORA-04030: out of
> > > process memory when trying to allocate 6857212 bytes
> > > (kxs-heap-c,temporary memory)
> > > ; nested exception is java.sql.SQLException: ORA-04030: out of process
> > > memory when trying to allocate 6857212 bytes (kxs-heap-c,temporary
> > > memory)
> > >
> > > This sql command is so big but in normal conditions is allwais ok.
> > > My status of PGA in the moment of error is
> > > NAME VALUE
> > > MB
> > > ----------------------------------------------------------------
> > > ---------------
> > > aggregate PGA target parameter
> > > 1024
> > > aggregate PGA auto target
> > > 864,65918
> > > global memory bound
> > > 100
> > > total PGA inuse
> > > 63,7832031
> > > total PGA allocated
> > > 92,5644531
> > > maximum PGA allocated
> > > 506,792969
> > > total freeable PGA memory
> > > 0
> > > process count
> > > ,000107765
> > > max processes count
> > > ,00011158
> > > PGA memory freed back to OS
> > > 0
> > > total PGA used for auto workareas
> > > 0
> > >
> > > NAME
> > > VALUE/1024/1024
> > > ----------------------------------------------------------------
> > > ---------------
> > > maximum PGA used for auto workareas
> > > 176,5625
> > > total PGA used for manual workareas
> > > 0
> > > maximum PGA used for manual workareas
> > > ,505859375
> > > over allocation count
> > > 0
> > > bytes processed
> > > 11014,7783
> > > extra bytes read/written
> > > 742,87207
> > > cache hit percentage
> > > ,00008934
> > > recompute count (total)
> > > ,027444839
> > >
> > > Where is the problem? Can you help my please?
> > > Best regards
> > > Roman Hodain
> > >
> > > And sorry my English is not very goot.
> >
> > ORA-04030 means the OS has no more memory to give to the process.
> >
> > There is a very good discussion of this error in MetaLink
> > Note:233869.1. Also, required reading is note 46001.1 "Oracle Database
> > and the Windows NT memory architecture"
> >
> >
> > We went round-and-round about this on a previous project. Bottom line
> > is since Windows is a 32-bit OS, you are faced with a hard 4-gig limit.
> > And left to its own devices, Windows will take half of that for
> > itself, leaving on only 2-gb for everything else. You can set an os
> > parm to tell windows to leave 3-gb for other processes, but that's it.
> > Your SGA and all of your PGA's (remember, one pga for each connection)
> > come out of that 2 (or 3) gig. Too many processes and you get
> > ora-04030, regardless of 'max processes'.

>

> Hi,
> I read some document on metalink. My os is switch to 3GB RAM. But i
> think that Oracle allocate SGA + PGA Memory and it is in my instance
> 700MB + 1GB. It is below 2G. Is it my hypothese goot? Or exist any
> proces with diferent memory?
> Best regards
> Roman Hodain

So you've got a 700mb SGA, and a 1-gb PGA. And how many concurrent sessions, each getting up to 1-gb for their PGA? Remember, the PGA is *per session*. So, if you have 5 concurrent sessions, each with a 1-gb PGA, that's

SGA = 0.7 gb

+ session 1, PGA=1-gb
+ session 2, PGA=1-gb
+ session 3, PGA=1-gb
+ session 4, PGA=1-gb
+ session 5, PGA=1-gb

= 5.7gb

Try running this query several times while your 'problem' process runs:

select sum(bytes)/1024/1024 Mb from

      (select bytes from v$sgastat
        union
        select value bytes from
             v$sesstat s,
             v$statname n
        where
             n.STATISTIC# = s.STATISTIC# and
             n.name = 'session pga memory'
       );
Received on Tue Oct 03 2006 - 16:18:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US