Skip to content

Commit c055417

Browse files
author
Likitha Shetty
committed
CLOUDSTACK-5336. During regression automation management server hang with "out of memory error".
Adding logs to help debug OOM error.
1 parent 0c64eda commit c055417

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public VmwareContext(VmwareClient client, String address) {
100100

101101
registerOutstandingContext();
102102
if(s_logger.isInfoEnabled())
103-
s_logger.info("New VmwareContext object, current outstanding count: " + getOutstandingContextCount());
103+
s_logger.info("New VmwareContext object: " + System.identityHashCode(this) + ", current outstanding count: " + getOutstandingContextCount());
104104
}
105105

106106
public boolean validate() {

vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContextPool.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ public VmwareContext getContext(String vCenterAddress, String vCenterUserName) {
8383
VmwareContext context = l.remove(0);
8484
context.setPoolInfo(this, poolKey);
8585

86-
if(s_logger.isTraceEnabled())
87-
s_logger.trace("Return a VmwareContext from the idle pool: " + poolKey + ". current pool size: " + l.size() + ", outstanding count: " + VmwareContext.getOutstandingContextCount());
86+
if(s_logger.isInfoEnabled())
87+
s_logger.info("Return a VmwareContext from the idle pool: " + poolKey + ". current pool size: " + l.size() + ", " +
88+
"outstanding count: " + VmwareContext.getOutstandingContextCount() + ". context: " + System.identityHashCode(context));
8889
return context;
8990
}
9091

@@ -107,11 +108,11 @@ public void returnContext(VmwareContext context) {
107108
context.clearStockObjects();
108109
l.add(context);
109110

110-
if(s_logger.isTraceEnabled())
111-
s_logger.trace("Recycle VmwareContext into idle pool: " + context.getPoolKey() + ", current idle pool size: "
112-
+ l.size() + ", outstanding count: " + VmwareContext.getOutstandingContextCount());
111+
if(s_logger.isInfoEnabled())
112+
s_logger.info("Recycle VmwareContext into idle pool: " + context.getPoolKey() + ", current idle pool size: "
113+
+ l.size() + ", outstanding count: " + VmwareContext.getOutstandingContextCount() + ". context: " + System.identityHashCode(context));
113114
} else {
114-
if(s_logger.isTraceEnabled())
115+
if(s_logger.isDebugEnabled())
115116
s_logger.trace("VmwareContextPool queue exceeds limits, queue size: " + l.size());
116117
context.close();
117118
}

0 commit comments

Comments
 (0)