Possible Memory Leak in WLS6.1-SP2
Hello,
I need your help in getting to the bottom of a memory issue we are facing.
We are running EJB based applications on Web Logic Server (WLS) 6.1 SP2 on Solaris
8 servers using 1.3.1_03 JDK. There are several applications running, but lets
use one of them as example.
I am using the following JDK parameters:
-XX:NewSize=96m -XX:MaxNewSize=96m -Xms384m -Xmx384m -XX:SurvivorRatio=2
The memory values on Solaris, before the application is started, are as follows:
Real memory = 4096M, Free memory = 2415M, Swap in use = 1059M, Swap free = 2322M
When I start the applications, I can see the memory foot print for this application
at around 540 Meg. Since JVM pre-allocates heap space, I expect this number to
remain constant as the application is stressed. But this does not happen, and
it puzzles me. I see the memory footprint of application go up, and that makes
me believe that is a memory leak somewhere. Since heap space remains below the
selected limit (384M), and the application does not over-run heap, it makes me
believe that the memory leak is not happening in application code; rather it is
Web Logic Server that is leaking memory.
As the application runs, the memory footprint increase from 540M to almost 900M,
to the point the system is left with very low free swap space, and the application
(not necessarily this particular one) starts throwing OutOfMemoryError.
At this point, it becomes impossible to recover and the only way out is to bounce
WLS.
Does it sound like a memory leak issue to you ? Do you agree that it look like
a WLS memory leak?
If anybody had similar experience, please help me with your advice. I would be
very interested in knowing how you diagnosed the problem and what solution did
you apply.
Thanks,
Asad Faizi
The native OCI driver is not allocating out of the Java heap, but rather
from the OS (or the c rtl) so the Java heap parameters do not affect it. I
don't know if it is a problem that you see or just normal behavior.
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com/coherence.jsp
Tangosol Coherence: Clustered Replicated Cache for Weblogic
"Asad Faizi" <[email protected]> wrote in message
news:[email protected]...
>
Cameron,
We are using Oracle-8.1.7r3 driver. Can you give me some more informationas to
why do you suspect Oracle JDBC driver? Have you had similar experience ?How did
you diagnose this and what did you do to fix it?
Thanks,
Asad Faizi
"Cameron Purdy" <[email protected]> wrote:
Probably a JDBC driver (Oracle OCI?).
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com/coherence.jsp
Tangosol Coherence: Clustered Replicated Cache for Weblogic
"Asad Faizi" <[email protected]> wrote in message
news:[email protected]...
Hello,
I need your help in getting to the bottom of a memory issue we arefacing.
We are running EJB based applications on Web Logic Server (WLS) 6.1SP2 on
Solaris
8 servers using 1.3.1_03 JDK. There are several applications running,but
lets
use one of them as example.
I am using the following JDK parameters:
-XX:NewSize=96m -XX:MaxNewSize=96m -Xms384m -Xmx384m -XX:SurvivorRatio=2
The memory values on Solaris, before the application is started, areas
follows:
Real memory = 4096M, Free memory = 2415M, Swap in use = 1059M, Swapfree =
2322M
When I start the applications, I can see the memory foot print forthis
application
at around 540 Meg. Since JVM pre-allocates heap space, I expect thisnumber to
remain constant as the application is stressed. But this does not
happen,
and
it puzzles me. I see the memory footprint of application go up, andthat
makes
me believe that is a memory leak somewhere. Since heap space remainsbelow
the
selected limit (384M), and the application does not over-run heap,it
makes me
believe that the memory leak is not happening in application code;rather
it is
Web Logic Server that is leaking memory.
As the application runs, the memory footprint increase from 540M toalmost
900M,
to the point the system is left with very low free swap space, andthe
application
(not necessarily this particular one) starts throwing OutOfMemoryError.
At this point, it becomes impossible to recover and the only way outis to
bounce
WLS.
Does it sound like a memory leak issue to you ? Do you agree that itlook
like
a WLS memory leak?
If anybody had similar experience, please help me with your advice.I
would be
very interested in knowing how you diagnosed the problem and what
solution
did
you apply.
Thanks,
Asad Faizi
Similar Messages
-
I'm using a plug-in for Eclipse to help identify possible memory leaks however we are having trouble interpreting the results. The top, and pretty much the only, suspect is this...
7,874 instances of "macromedia.jdbc.oracle.OracleConnection", loaded by "coldfusion.bootstrap.BootstrapClassLoader @ 0xf935218" occupy 604,781,904 (71.02%) bytes. These instances are referenced from one instance of "java.util.HashMap$Entry[]", loaded by "<system class loader>"
Any ideas what could cause this many instances? How do we track this back to a particular cfm or cfc? Do these number seem high or is that normal? The system in question normally only has 30-60 concurrent users.
The one item I'm a little skeptical of is the use of the "coldfusion.server.ServiceFactory" and "coldfusion.sql.QueryTable" objects. We use them for 1000s of different queries, even queries within large loops. Could these be the problem? Each time we need to execute a query we do a createObject for each of these objects, when done we close the connection. I recently found a similar example where they close the recordSet first and then close the connection, we are not closing the recordSet. Any help at all is much appreciated.It could simply be caused by the obvious: a query or queries making a large number of connections and/or consuming large resources on the Oracle database. Use Eclipse to search your application folder for queries. Can you identify any queries that could be the culprit? Is there a loop containing a method or an instance of a component that queries an Oracle database?
What's your Coldfusion version? If you're on CF8 or CF9 then the server monitor (in the Coldfusion Administrator) might tell you the process responsible for the high consumption. -
Memory leak in WLS6.1 sp3 on Solaris?
We are running WLS 6.1 sp3 on Solaris 8 using Sun's 1.3.1 JVM with BEA's
JDriver to connect to Oracle (8.1.7). We have set the JVM to a maximum heap
of 512M (-Xms256m -Xmx512m).
The issue is that we are now seeing (via pmap) the resident memory growing
to ~1GB. Yet, the WLS management console is reporting memory usage of ~200M.
So, if we are to believe WLS, then the JVM (or some native library) is
chewing up the extra memory.
Having examined the results of "pmap -x <pid>", I see the heap (and some
anon) mem/file are quite large.
Address Kbytes Resident Shared Private Permissions Mapped File
00026000 418912 416096 - 416096 read/write/exec [ heap ]
D8C00000 524288 447928 - 447928 read/write/exec [ anon ]
total Kb 1083832 981136 37960 943176
Questions:
- Are there any known memory leaks with 6.1 sp3 on Solaris?
- Should it be possible for pmap's value of "heap" to grow larger than the
"Xms" setting? We have observed this recently, but the numbers above don't
reflect this.
- Any idea what the "anon" is or how to determine what it is?
- Do you know of any tools that might help me determine what is using that
memory or what is in it?
Any suggestions will be greatly appreciated...
Thanks in advance,
ErikIf you set -Xmx512m then the java heap will grow no larger than 512MB.
WLS is reporting the size of the java heap. (It is a java program after
all and doesn't know a lot about what native code might be doing.)
My first thought is try running with Oracle's thin (type-4) driver.
Since this is java code, it will use the java heap. If the memory usage
drastically changes, then you can point the finger at the jDriver.
Are you using any other native code / libraries?
-- Rob
Erik Westland wrote:
We are running WLS 6.1 sp3 on Solaris 8 using Sun's 1.3.1 JVM with BEA's
JDriver to connect to Oracle (8.1.7). We have set the JVM to a maximum
heap
of 512M (-Xms256m -Xmx512m).
The issue is that we are now seeing (via pmap) the resident memory growing
to ~1GB. Yet, the WLS management console is reporting memory usage of
~200M.
So, if we are to believe WLS, then the JVM (or some native library) is
chewing up the extra memory.
Having examined the results of "pmap -x ", I see the heap (and some
anon) mem/file are quite large.
Address Kbytes Resident Shared Private Permissions Mapped File
00026000 418912 416096 - 416096 read/write/exec [ heap ]
D8C00000 524288 447928 - 447928 read/write/exec [ anon ]
total Kb 1083832 981136 37960 943176
Questions:
- Are there any known memory leaks with 6.1 sp3 on Solaris?
- Should it be possible for pmap's value of "heap" to grow larger than the
"Xms" setting? We have observed this recently, but the numbers above don't
reflect this.
- Any idea what the "anon" is or how to determine what it is?
- Do you know of any tools that might help me determine what is using that
memory or what is in it?
Any suggestions will be greatly appreciated...
Thanks in advance,
Erik -
Possible memory leak in TagFileTagInfo class
Hello,
Our application is experiencing a memory leak in Weblogic, which is not happening in other application servers.
We are running Weblogic server 10.3 using the distributed jsf 1.2
Eclipse Memory Analyzer clearly points to TagFileTagInfo class as retaining a Map which holds all the memory. Furthermore, it shows that said map (called _tagFileInfoMap) is holding FileTagFileInfo class instances.
It could be possible that our application were doing something wrong, and that would cause the described behavior, however I doubt that as the other application servers where our application is deployed do not present this problem.
Any suggestion on how we should proceed to fix this problem?
Thanks
JuanHi,
Was this issue resolved by using wlappc?
Were you able to compile the tag files with wlappc? I tried compiling the jsps using wlappc, but it seems that the tool expects an ejb-jar file.
Any help on this is greatly appreciated.
Thanks
Hareesh -
Possible memory leak in e4x or HTTPService with e4x format
Hello,
I think I have found a memory leak in e4x.
In very special cases (=xml) the player swallows the memory.
The little test program connects to a web server for an xml
file, and the result is converted to an array.
The array is displayed in a DataGrid.
There are two files:
leaktest.xml doesn't leak in any cases (format: e4x or xml)
pbentries.xml leaks when the format is e4x.
Choose e4x format and check Use "Leak" file! Than the program
leaks.
For the whole test case (mxml file, html file and xml files)
please contact me at
[email protected]
or
[email protected]
and I send a zip file as soon as possible.
Probably there is a bug in my test program. If so than please
send me a feedback.
Thanks,
Lacito
------ For the program cut here ------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
import mx.managers.PopUpManager;
import mx.core.Application;
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.http.mxml.HTTPService;
protected var records_:Array = null;
protected var httpService:HTTPService = null;
[Bindable("recordsChange")]
public function set records(_records:Array):void
this.records_ = _records;
var e:Event = new Event("recordsChange");
dispatchEvent(e);
public function get records():Array
return records_;
protected function getXML():void
var resultFormat:String = cbResultFormat.selectedItem as
String;
var params:Object = new Object();
httpService = new HTTPService();
httpService.concurrency = "single";
httpService.showBusyCursor = true;
var lastIndex:int = url.lastIndexOf("/");
var fileName:String = null;
if(chbUseLeakFile.selected)
// It leaks... :(
fileName = "pbentries.xml";
else
// It doesn't leak... :)
fileName = "leaktest.xml";
var _url:String = url.substr(0, lastIndex+1) + fileName;
httpService.url = _url;
httpService.resultFormat = resultFormat;
httpService.method = "POST";
httpService.addEventListener(ResultEvent.RESULT,
processResult);
httpService.addEventListener(FaultEvent.FAULT,
processFault);
httpService.send(params);
protected function processResult(e:ResultEvent):void
var resultFormat:String = cbResultFormat.selectedItem as
String;
removeListeners();
if(resultFormat==mx.rpc.http.HTTPService.RESULT_FORMAT_XML)
setArrayFromXMLNode();
else
setArrayFromXML();
destroyHttpService();
// format= "e4x"
protected function setArrayFromXML():void
var xml_:XML = httpService.lastResult as XML;
var ar:Array = new Array();
var x:XML = null;
var xl:XMLList = xml_.phonebookEntries[0].phonebookEntry;
for each(x in xl)
var record:Object = new Object();
var prop:XML = null;
var props:XMLList = x.children();
for each(prop in props)
record[prop.localName()] = prop.toString();
ar.push(record);
records = ar;
// format= "xml"
protected function setArrayFromXMLNode():void
var xml_:XMLNode = httpService.lastResult as XMLNode;
var ar:Array = new Array();
var x:XMLNode = null;
var xl:Array = xml_.lastChild.childNodes;
for each(x in xl)
var record:Object = new Object();
var prop:XMLNode = null;
var props:Array = x.childNodes;
for each(prop in props)
record[prop.localName] = prop.firstChild!=null ?
prop.firstChild.nodeValue : null;
ar.push(record);
records = ar;
protected function destroyHttpService():void
httpService.clearResult(false);
httpService.disconnect();
httpService = null;
protected function processFault(e:FaultEvent):void
removeListeners();
Alert.show(e.fault.faultString, e.fault.faultCode);
destroyHttpService();
protected function removeListeners():void
httpService.removeEventListener(ResultEvent.RESULT,
processResult);
httpService.removeEventListener(FaultEvent.FAULT,
processFault);
protected function collect():void
// Garbage Collection
try
new LocalConnection().connect('foo');
new LocalConnection().connect('foo');
catch(e:*)
]]>
</mx:Script>
<mx:ArrayCollection id="alRecords" source="{records}"
/>
<mx:Label x="10" y="10" text="Result format:"
id="lResultFormat"/>
<mx:ComboBox x="104" y="8" id="cbResultFormat">
<mx:Array>
<mx:String>e4x</mx:String>
<mx:String>xml</mx:String>
</mx:Array>
</mx:ComboBox>
<mx:DataGrid id="dgRecords" x="10" y="36" width="936"
height="437"
dataProvider="{alRecords}"
verticalScrollPolicy="auto"
horizontalScrollPolicy="auto">
</mx:DataGrid>
<mx:Button x="355" y="496" label="Get xml" id="btnGetXML"
click="{getXML();}" />
<mx:Button x="155" y="496" label="GC" id="btnGC"
click="{collect();}" />
<mx:CheckBox x="276" y="10" label="Use
"LEAK" file:" labelPlacement="left"
id="chbUseLeakFile" selected="true"/>
</mx:Application>Hello,
After 3 months (and a new version of flex and flash player)
my test program is still leaking.
If somebody could confirm the leak it would be appreciated.
Thanks,
Lacito
P.S.: I heard that Adobe had donated ActionScript 3 VM to
Mozilla.org. Should I disturb them with my problem? -
Possible memory leak in JSF � help needed
Hi,
We are developing a JSF application using the following:
SUN JSF 1.1_02-b08
Tomahawk 1.1.3
Tomcat 5.5
Our application includes pages with lists; these lists are held and extracted from backing beans.
We are using these beans in request scope with <t:saveState> tag (to avoid holding the lists in the session all the time).
We tested the application using JProbe and found out that each bean that was used in the saveState was added to the view (to the session) , each time we entered the page , and the bean was not released until the end of the session (instead of only one instance of the backing bean).
After I found this problem, I added the following context params to the web.xml:
com.sun.faces.NUMBER_OF_VIEWS_IN_SESSION = 1 (instead of the default 15)
com.sun.faces.NUMBER_OF_VIEWS_IN_LOGICAL_VIEW_IN_SESSION = 1 (instead of the default 15)
We tested the application again, and now no unnecessary instances of the beans were held in the session (in the view).
BUT , now when we use the browser �Back� button, and returning to a page with a list, when selecting an item from the list, no action is performed (the list in the server side does not exist).
My questions are:
1)What is the meaning (difference) of each of the context param : NUMBER_OF_VIEWS_IN_SESSION , NUMBER_OF_VIEWS_IN_LOGICAL_VIEW_IN_SESSION
2)What are the recommended values for these parameters, to minimize session memory, and to enable the usage of the browser �Back� button.
Thank you all,
Lior.Me too.
Please somebody knows how can we avoid memory leak problems in JSF 1.1 ?
Thansk in advanced -
Alright - not sure what type of problem this is but it is a
problem. The scenario is this: I have an application that worked
fine in CF7 (in terms of allocating and releasing memory) - but
when I moved to 8 - my memory keeps growing and growing without
anything being released (so it seems). This is a gigantic pain
because everything works great in 8 except for memory management
issues - I have tried all sorts of JVM argument combinations (for
setting the garbage collection and heap sizes, GC intervals,
etc...) - I cannot get jrun.exe to quit growing to the point it has
to be restarted.
Does anyone know what could be doing this? I can't turn
memory monitor on or the app crawls - but for some reason the new
architecture seems to disregard garbage collection (or at least on
certain objects).
I just find it extremelly frustrating that CF7 seems to be
fine in terms of jrun.exe running fine with memory not going crazy
- but CF8 just doesn't want to play nicely.
Any help with this is greatly appreciated.
Thanks,
CMThanks for your help ke4pym - figured it out (and this might
help some others as well):
We have a 2 tier web app with a database server and an
application/web server - the database server is running
Intersystems' Cache 5.2 and we have CF8 connected via the 'OTHER'
selection in the datasource admin using a jdbc connection string
and the Cache driver that ships iwth Cache. Works good - there are
a couple benefits with doing this rather than using an ODBC
connection (which uses a system DSN on the server and limits our
connectivity to only queries - no stored procs or anything else -
so essentially - the onty thing we could do with the ODBC
connection is query the database).
So we figured out how to connect using the jdbc connection
and Cache driver which allowed us to then run stored proc's and
whatever else we wanted to do in Cache via stored procedure calls -
BUT - here is where the problem came up - for some reason - all the
connection references or query data that was being used NEVER WAS
RELEASED FROM MEMORY - it simply stayed there until we restarted
the CF app server and refreshed everything. Once we put it back to
the ODBC it works fine - doesn't use any memory for database calls
(the main problem was that we have an email job that generates 1000
or so reports for customers and emails them off - around 200 or so
- the server would crash with an 'outofmemory exception' which we
tracked down in the jre logs.
So not sure if this is a bug or if it is just an unstable way
of using these two technologies - but thank goodness we figured out
that reverting back to the ODBC fixed all memory leaks (or whatever
you want to call them). So take note anyone - IF YOU USE A
CONNECTION STRING TO CONNECT TO A DATABASE AND SEEM TO EXPERIENCE
MEMORY ISSUES WITH LARGE AMOUNTS OF INFORMATION BEING QUERIED FROM
THE DATABASE - TRY USING AN ODBC CONNECTION (via a system DSN
created in windows ODBC admin).
Last thing - where did you find the HF2 - I only see HF1 for
CF8 listed in the developer center - can you send a link please?
Thanks for your help again ke4pym,
CM -
Possible memory leak in Oracle 12.1.0 C client
Dear Oracle Users and Professionals,
I want to report Oracle 12.1.0 C client memory leak when reconnect feature is on place. I have used Valgrind/massif tool to diagnostic our components and there was small memory leak in libclntsh.so.12.1 which is calling libc function getaddrinfo(). This seems to be not freed when connection is closed, but my application is still running and keep reconnect when needed.
I sought a bit on internet and Oracle Portals about this and did not find any information that some has detected this particular issue.
In the attachment is trace back from massif: comparison of two different time slots.
We are developers and use only free available Oracle client versions. Our customer which will operate the system has available whole Oracle Support.
If you can give me advice, to reach state where we will have no memory leak, it would be helpfull.
Thank you very much
Jan Kianicka
([email protected])Hi Jan,
This forum is for questions about connecting to non-Oracle databases. For questions about the Oracle client connecting to Oracle databases then try either one of these forums - I am not sure which will be best -
ODBC
or
General Database Discussions
Regards,
Mike -
I can start my C_API JMS application and just create a JMS context. Looking at the windows task manager I see the memory footprint slowly grow.
I'm not a Java wizard so I haven't found the right tools set for diagnosing this.
Thanks for any helpHas anyone else tried to track a memory leak in a JNI application? How did you achive this task, what tools did you use?You write a library in C/C++ only which does NOT use JNI which implements the functionality you want to achieve in your java application.
You write a wrapper for that which excercises it completely including be able to run it in a loaded state.
Then you buy/find a C/C++ profiling tool and run it on the wrapper.
You write you JNI code such that the ONLY thing it does is interface between java and the library above. It doesn't impleent business logic nor work flow. -
Possible memory leak in C++ code
Hello,
I have a Java application that calls through JNI, functions in a C++ dll that use the GroupWise API (COM based). After the application creates a number of accounts in GroupWise the memory footprint of the java.exe process reaches ~1.5GB of RAM on a 32 bit Windows OS. After reaching this value, the C++ code no longer works, meaning that connecting to GroupWise fails. If I restart the application at this point everything starts to work until it reached ~1.5 GB again.
I am suspecting that the problem might be caused by a memory leak. I have taken a dump of the java process with jmap and analyzed it with jhat. If I have not released an object in C++ code, would this object be visible in the dump i took of the java.exe process? The biggest consumer from what i have seen in the dump is class [B 20353-instances 33259261-bytes.
Has anyone else tried to track a memory leak in a JNI application? How did you achive this task, what tools did you use?
Thank you,
Ionut Marin.Has anyone else tried to track a memory leak in a JNI application? How did you achive this task, what tools did you use?You write a library in C/C++ only which does NOT use JNI which implements the functionality you want to achieve in your java application.
You write a wrapper for that which excercises it completely including be able to run it in a loaded state.
Then you buy/find a C/C++ profiling tool and run it on the wrapper.
You write you JNI code such that the ONLY thing it does is interface between java and the library above. It doesn't impleent business logic nor work flow. -
OCIServerAttach possible memory leak
Hi
For the last day I'm stuck in this case...and I'm pretty sure it is a memory leak:
I have a multithreaded application, in C++. First I create a threaded environment (OCIEnvCreate in OCI_THREADED mode) in the main application thread. Next i start multiple threads, and in each one I open a new session to the Oracle database, using OCIServerAttach and next OCIBeginSession.
I'm testing the case when the threads keep failing and they are restarted. For the tests I use an invalid schema (a dummy name that's not present in tnsnames.ora) when calling OCIServerAttach. In this case the statement fails and I call OCIServerDetach, which it should release the memory allocated in OCIServerAttach, but it seems that it doesn't do that...I watched the application with a memory leak detection tool and i keep getting memory leaks in OCIServerAttach....
I read about this exact problem in some older Oracle releases, 8i. Now I'm using Oracle 9.2 with 9.2.0.4 patch installed.
Please help me with any idea, cause i'm getting desperate...
mariusexactly :) it doesn't seem like it has leaks :) but...
i made a test where i restarted 4 threads about 2000 - 3000 times (each time executing OCIServerAttach - OCIServerDetach)...and i got about 400 leaks. it's not for each thread...i don't get it
here is the code:
- open a new session:
bool CORCLSession::beginSession(IN OCIEnv* phEnv,
IN const char* pszConnectString)
if (true == m_fConnected)
endSession();
m_phEnv = phEnv;
strcpy(m_szConnectString, pszConnectString);
char szUserName[MAX_CONNECT_STRING];
char szPassword[MAX_CONNECT_STRING];
char szSchema[MAX_CONNECT_STRING];
splitConnectString(m_szConnectString, szUserName, szPassword, szSchema);
/* allocate an error handle */
m_nRetCode = OCIHandleAlloc((dvoid *)m_phEnv,
(dvoid **)&m_phError,
OCI_HTYPE_ERROR, 0, (dvoid **) 0);
handleRetCode(CORCLException::OSES_BEGINSESSION);
/* allocate a server handle */
m_nRetCode = OCIHandleAlloc ((dvoid *)m_phEnv, (dvoid **)&m_phServer,
OCI_HTYPE_SERVER, 0, (dvoid **) 0);
handleRetCode(CORCLException::OSES_BEGINSESSION);
/* create a server context */
m_nRetCode = OCIServerAttach (m_phServer, m_phError,
(text *)szSchema, strlen(szSchema),
OCI_DEFAULT);
handleRetCode(CORCLException::OSES_BEGINSESSION);
m_fAttach = true;
/* allocate a service handle */
m_nRetCode = OCIHandleAlloc((dvoid *)m_phEnv,
(dvoid **)&m_phSvcCtx,
OCI_HTYPE_SVCCTX, 0, (dvoid **) 0);
handleRetCode(CORCLException::OSES_BEGINSESSION);
/* set the server attribute in the service context handle*/
m_nRetCode = OCIAttrSet((dvoid *)m_phSvcCtx, OCI_HTYPE_SVCCTX,
(dvoid *)m_phServer,
(ub4) 0, OCI_ATTR_SERVER, m_phError);
handleRetCode(CORCLException::OSES_BEGINSESSION);
/* allocate a user session handle */
m_nRetCode = OCIHandleAlloc((dvoid *)m_phEnv,
(dvoid **)&m_phUserSession,
OCI_HTYPE_SESSION, 0, (dvoid **) 0);
handleRetCode(CORCLException::OSES_BEGINSESSION);
/* set username attribute in user session handle */
m_nRetCode = OCIAttrSet((dvoid *)m_phUserSession, OCI_HTYPE_SESSION,
(dvoid *)szUserName, (ub4)strlen(szUserName),
OCI_ATTR_USERNAME, m_phError);
handleRetCode(CORCLException::OSES_BEGINSESSION);
/* set password attribute in user session handle */
m_nRetCode = OCIAttrSet((dvoid *)m_phUserSession, OCI_HTYPE_SESSION,
(dvoid *)szPassword, (ub4)strlen(szPassword),
OCI_ATTR_PASSWORD, m_phError);
handleRetCode(CORCLException::OSES_BEGINSESSION);
/*begin session !*/
m_nRetCode = OCISessionBegin( m_phSvcCtx, m_phError, m_phUserSession,
OCI_CRED_RDBMS, OCI_DEFAULT);
handleRetCode(CORCLException::OSES_BEGINSESSION);
/* set the user session attribute in the service context handle*/
m_nRetCode = OCIAttrSet((dvoid *)m_phSvcCtx, OCI_HTYPE_SVCCTX,
(dvoid *)m_phUserSession, (ub4) 0,
OCI_ATTR_SESSION, m_phError);
handleRetCode(CORCLException::OSES_BEGINSESSION);
m_fConnected = true;
return true;
- closing a session:
void CORCLSession::endSession()
if (m_fAttach)
// first detach the server
m_nRetCode = OCIServerDetach(m_phServer, m_phError, OCI_DEFAULT);
m_fAttach = false;
if(m_fConnected)
m_nRetCode = OCISessionEnd( m_phSvcCtx, m_phError,
m_phUserSession, OCI_DEFAULT);
m_fConnected = false;
if (m_phServer != NULL)
// now de-alloc the server handle
m_nRetCode = OCIHandleFree((dvoid*)m_phServer, OCI_HTYPE_SERVER);
m_phServer = NULL;
if (m_phError != NULL)
m_nRetCode = OCIHandleFree((dvoid*)m_phError, OCI_HTYPE_ERROR);
m_phError = NULL;
if (m_phUserSession != NULL)
m_nRetCode = OCIHandleFree((dvoid*)m_phUserSession , OCI_HTYPE_SESSION);
m_phUserSession = NULL;
if (m_phSvcCtx != NULL)
m_nRetCode = OCIHandleFree((dvoid*)m_phSvcCtx , OCI_HTYPE_SVCCTX);
m_phSvcCtx = NULL;
} -
Possible Memory Leak... Real problem. Please Help
Hello,
About a couple of months ago I started getting a little concerned with my MacBook Pro's Hard Drive space, I deleted a bunch of stuff, after noticing I only had less than 1 Gb left, then I purchased an external HD and have used it to back up, and also to remove stuff from my hard drive in the computer. But now, I have noticed a problem that rather concerns me, If I put my computer to sleep after a normal day of work, and usage, when I wake it up it seems fine, and it runs about the same (a little less efficient, but not too much) then I realize that I am missing about 1-2 Gbs in Hard Drive Space. If I restart the computer, That memory comes back... and then If I keep using the computer, it leaks memory little by little.
I have tried running anti-viruses and spyware software but that does not seem to work against this issue, unless I am doing something wrong. I have also tried to update all my software and keep my processes and running applications to a minimum. Finally, I tried leaving the computer on... without doing anything, connected to the internet... It leaked some more memory. I did the same, but without the internet... and then it did not leak anymore. I have no clue how this happen or how to fix it. I have tried most of the things I know could have possibly helped, but seems like isolating the problem to the internet does not really help me, since I need it for work.
I would appreciate any suggestions or help, Thanks!!You are describing the natural process of virtual memory and Apple's use of a sleep image. Look in /var/vm for these files. It is not uncommon to have a sleep image of a couple of GB. Think about it. You have a computer that has data on a hard drive. When you start up the machine, that data needs to move from the hard drive to RAM and then, in some cases, back to the hard drive as virtual memory. This is when you do not have enough physical RAM to hold everything you are doing. Now, what happens when the machine goes to sleep? Well, you have data in RAM that in most cases will remain there as long as there is power. On a laptop, it is possible for the contents of RAM to be written to a file in the event of a battery depletion. THis is the suspended hibernation feature that Apple has. Commonly, there is one swapfile and one sleepimage file located in /var/vm.
If you are missing a lot of space, you might instead want to check out your log files. It is possible that something caused a high number of log entries to be recorded and you have an incredibly large log file. Also, if your machine is not running between 3 and 4 a.m., you are missing the default maintenance scripts that run and rotate log files. Look in /var/log for unusually large logs.
Hope this helps. -
Possible memory leak in Weblogic 7.0
We have developed an EJB application on Weblogic 7.0 running on HP-UX 11.0. Some
JSP/Javabean programs, that lookup EJB compoments for services, are developed
on the Resin web server to serve browser requests. Both Resin and Weblogic are
running on the same HP machine. JDK version is 1.3.1_06 for HP-UX.
The real memory is 2GB. Tha parameters to start Resin server are
-showversion -verbose:gc -Xms384m -Xmx384m -Xoptimize
The parameters to startup Weblogic are in the following:
-server -showversion -verbose:gc -Xms768m -Xmx768m -XX:NewSize=256m -XX:SurvivorRatio=6
-Xoptimize -XdoCloseWithReadPending
In our observations, the peak traffic is during the working hours. Only few users
(less than 40 users) stay in our system in the night and holidays.
And in our observations, the weblogic will do the GC if necessary. But some memory
are lost after each GC even not in the peak time. Thus, after running two or three
days, there are only lillte free memory for use, and the Weblogic begins to take
much time (10-30 seconds ) doing GC more often and often. At last, an OutOfMemory
error generated.
I hope that Weglogic can serve all the time.
Does anybody han as experience on this problem?Thanks for your kinfness.
We have wrote some single-user applications to test the Weblogic 7.0. We doubt
it is JDBC driver's problem.
We downloaded the Informix JDBC driver 2.21_JC2 to replace the older version 2.20_JC1
and retest our applications. The memory usage curve looks much better and the
applications run over three days.
We will continue to observe the execution. Maybe the JDBC driver is the real problem.
"Aravind Krishnasamy" <[email protected]> wrote:
I am not sure whether it's an application problem or application server
problem. Both are possible. I am not familar with HP Java Version.
It may be a problem due to loitering object. You can try doing testing
with
single user and the memory needs for the user.
NoteThe memory level before the test and after the test
Foce GC and you need to GC same level of HEAP Used, Profiling tools will
be
helpful to find application problem
Aravind
"Wen-Hung Yeh" <[email protected]> wrote in message
news:[email protected]...
We have developed an EJB application on Weblogic 7.0 running on HP-UX11.0. Some
JSP/Javabean programs, that lookup EJB compoments for services, aredeveloped
on the Resin web server to serve browser requests. Both Resin and Weblogicare
running on the same HP machine. JDK version is 1.3.1_06 for HP-UX.
The real memory is 2GB. Tha parameters to start Resin server are
-showversion -verbose:gc -Xms384m -Xmx384m -Xoptimize
The parameters to startup Weblogic are in the following:
-server -showversion -verbose:gc -Xms768m -Xmx768m -XX:NewSize=256m-XX:Su
rvivorRatio=6
-Xoptimize -XdoCloseWithReadPending
In our observations, the peak traffic is during the working hours.Only
few users
(less than 40 users) stay in our system in the night and holidays.
And in our observations, the weblogic will do the GC if necessary.But
some memory
are lost after each GC even not in the peak time. Thus, after runningtwo
or three
days, there are only lillte free memory for use, and the Weblogic beginsto take
much time (10-30 seconds ) doing GC more often and often. At last,an
OutOfMemory
error generated.
I hope that Weglogic can serve all the time.
Does anybody han as experience on this problem? -
Very high memory usage..possible memory leak? Solaris 10 8/07 x64
Hi,
I noticed yesterday that my machine was becoming increasingly slow, where once it was pretty snappy. It's a Compaq SR5250NX with 1GB of RAM. Upon checking vmstat, I noticed that the "Free" column was ~191MB. Now, the only applications I had open were FireFox 2.0.11, GAIM, and StarOffice. I closed all of them, and the number reported in the "Free" column became approximately 195MB. "Pagefile" was about 5.5x that size. There were no other applications running and it's a single user machine, so I was the only one logged in. System uptime: 9 days.
I logged out, logged back in, to see if that had an affect. It did not. Rebooted and obviously, that fixed it. Now with only FireFox, GAIM, and a terminal open, vmstat reports "Free" as ~450MB. I've noticed if I run vmstat every few seconds, the "Free" total keeps going down. Example:
unknown% vmstat
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr cd s0 s1 s2 in sy cs us sy id
0 0 0 870888 450220 9 27 10 0 1 0 8 2 -0 -0 -0 595 1193 569 72 1 28
unknown% vmstat
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr cd s0 s1 s2 in sy cs us sy id
0 0 0 870880 450204 9 27 10 0 1 0 8 2 -0 -0 -0 596 1193 569 72 1 28
unknown% vmstat
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr cd s0 s1 s2 in sy cs us sy id
0 0 0 870828 450092 9 27 10 0 1 0 8 2 -0 -0 -0 596 1193 570 71 1 28
unknown%Output of prstat -u Kendall (my username ) is as follows:
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
2026 Kendall 124M 70M sleep 59 0 0:01:47 1.4% firefox-bin/7
1093 Kendall 85M 77M sleep 59 0 0:07:15 1.1% Xsun/1
1802 Kendall 60M 15M sleep 59 0 0:00:08 0.1% gnome-terminal/2
1301 Kendall 93M 23M sleep 49 0 0:00:30 0.1% java/14
1259 Kendall 53M 15M sleep 49 0 0:00:32 0.1% gaim/1
2133 Kendall 3312K 2740K cpu1 59 0 0:00:00 0.0% prstat/1
1276 Kendall 51M 12M sleep 59 0 0:00:11 0.0% gnome-netstatus/1
1247 Kendall 46M 10M sleep 59 0 0:00:06 0.0% metacity/1
1274 Kendall 51M 13M sleep 59 0 0:00:05 0.0% wnck-applet/1
1249 Kendall 56M 17M sleep 59 0 0:00:07 0.0% gnome-panel/1
1278 Kendall 48M 9240K sleep 59 0 0:00:05 0.0% mixer_applet2/1
1245 Kendall 9092K 3844K sleep 59 0 0:00:00 0.0% gnome-smproxy/1
1227 Kendall 8244K 4444K sleep 59 0 0:00:01 0.0% xscreensaver/1
1201 Kendall 4252K 1664K sleep 59 0 0:00:00 0.0% sdt_shell/1
1217 Kendall 55M 16M sleep 59 0 0:00:00 0.0% gnome-session/1
779 Kendall 47M 2208K sleep 59 0 0:00:00 0.0% gnome-volcheck/1
746 Kendall 5660K 3660K sleep 59 0 0:00:00 0.0% bonobo-activati/1
1270 Kendall 49M 10M sleep 49 0 0:00:00 0.0% clock-applet/1
1280 Kendall 47M 8904K sleep 59 0 0:00:00 0.0% notification-ar/1
1199 Kendall 2928K 884K sleep 59 0 0:00:00 0.0% dsdm/1
1262 Kendall 47M 2268K sleep 59 0 0:00:00 0.0% gnome-volcheck/1
Total: 37 processes, 62 lwps, load averages: 0.11, 0.98, 1.63System uptime is 9 hours, 48 minutes. I'm just wondering why the memory usage seems so high to do...nothing. It's obviously a real problem as the machine turned very slow when vmstat was showing 195MB free.
Any tips, tricks, advice, on which way to go with this?
Thanks!Apologies for the delayed reply. School has been keeping me nice and busy.
Anyway, here is the output of prstat -Z:
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
2040 Kendall 144M 76M sleep 59 0 0:04:26 2.0% firefox-bin/10
28809 Kendall 201M 193M sleep 59 0 0:42:30 1.9% Xsun/1
2083 Kendall 186M 89M sleep 49 0 0:02:31 1.2% java/58
2260 Kendall 59M 14M sleep 59 0 0:00:00 1.0% gnome-terminal/2
2050 Kendall 63M 21M sleep 49 0 0:01:35 0.6% realplay.bin/4
2265 Kendall 3344K 2780K cpu1 59 0 0:00:00 0.2% prstat/1
29513 Kendall 71M 33M sleep 39 0 0:07:25 0.2% gaim/1
28967 Kendall 56M 18M sleep 59 0 0:00:24 0.1% gnome-panel/1
29060 Kendall 93M 24M sleep 49 0 0:02:58 0.1% java/14
28994 Kendall 51M 13M sleep 59 0 0:00:23 0.1% wnck-applet/1
28965 Kendall 49M 14M sleep 59 0 0:00:33 0.0% metacity/1
649 noaccess 164M 46M sleep 59 0 0:09:54 0.0% java/23
28996 Kendall 51M 12M sleep 59 0 0:00:50 0.0% gnome-netstatus/1
2264 Kendall 1352K 972K sleep 59 0 0:00:00 0.0% csh/1
28963 Kendall 9100K 3792K sleep 59 0 0:00:03 0.0% gnome-smproxy/1
ZONEID NPROC SWAP RSS MEMORY TIME CPU ZONE
0 80 655M 738M 73% 1:18:40 7.7% global
Total: 80 processes, 322 lwps, load averages: 0.27, 0.27, 0.22Sorry about the bad formatting, it's copied from the terminal.
In any event, we can see that FireFox is sucking up 145MB (??!?!!? crazy...) XSun, 200MB, and java 190MB. I'm running Java Desktop System (Release 3) so I assume that is what accounts for the the high memory usage RE: java process. But, XSun, 200MB?
Is this normal and I just need to toss another gig in, or what?
Thanks -
Possible memory leak in forms api 6i
There appears to be a bug in forms 6i.
I am getting an error at the following snippet of code. The Name prints fine and the whole code runs great if i comment out free(v_value), but obviously i would not want to do that.
I am using MS VC++ 6.0 compiler,
The error is::
HEAP[xephr.exe]: Invalid Address specified to RtlFreeHeap( 3540000, 364fc08 )
This means that i am trying to free the memory which has already been freed, meaning thereby that api has already freed the memory associated with name. But then why should the api function d2fobgt_GetTextProp free the memory allocated for name as i am supposed to free it.
Now that appears to be a bug.
Please suggest...
Here is that relevant code snippet...
text* name;
if (d2fobgt_GetTextProp(ctx, p_obj, prop_num, &name)==D2FS_SUCCESS)
printf("\nName=%s\n", name); /* prints the name properly*/
if ( v_value!=NULL )
free(v_value); /* Raises error, Invalid Address specified to RtlFreeHeap, the error disappears if i
comment out the free(value) line. */Hello :)
I read your message cause i look for a answer to a big problem i encountered while trying sample code from Oracle Forms API : it's impossible to create the Forms API Context, the d2fctxcr_Create() function always return D2FS_FAIL.
As your problem seem to be happened after this call, i wonder you can create the context without errors.
Here the code I used, so perhaps you can see my error (I compile under VC6) :
int main (int argc, char *argv[])
d2fctxa ctx_attr;
d2fctx *ctx;
d2fstatus status;
/* Create Forms API context */
ctx_attr.mask_d2fctxa = 0;
if ( (status=d2fctxcr_Create(&ctx, &ctx_attr)) != D2FS_SUCCESS )
fprintf(stderr, "Error creating Forms API context (%d)\n",status);
exit(1); /* ALWAYS GO THERE */
Maybe you are looking for
-
Not getting attribute values in IPC routines Scenerio R/3 B2B using AP 7.0
Hi, Our Scenerio is using ISA R/3 B2B using AP 7.0. I have developed IPC routines but when i debug my routines in SM53 I notice that I'm not getting any attribute value except for VKORG. I'm pasting the code below. Please help me if I have to impleme
-
Need sql query to find out same item is used in open po and closed po
Hi Experts, I have an requirement is that, i need to find out the item is used in open po and closed po. example: A is the item is used in closed PO and Open PO. i need to write down the scripts how many same items is used in open po and closed p
-
Writing data from a table into a spreadsheet file
I've managed to figure out putting a table on the screen for user in put (I think I made it more difficult for myself than it actually was) and I can have LabVIEW convert the data into a spreadsheet string and display that for me. Now I'd like to s
-
My address for delivery of the order is wrong. Can I get the file to download online?
Hello, I made a purchase on the American site and my address is not corresponding. Please, I want to receive the file for download online. Because I live in Brazil and address of correspondence is not my home. Infos for ship.. Invoice Number:
-
Need IDE help for Xcode 4.1
Hi all, Not sure where to ask this question but out of all the choices I chose this area. I am trying to learn to program the mac starting out with the basics of C. I got a hold of a book, "Learn C on the Mac" by Dave Mark. It's a great book but u