You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Pa...@moorewallace.com on 2004/01/06 17:26:22 UTC

Locking up Application Server when creating new HSSFWorkbook

We are running into a strange issue on our application.  When we are
reading in an existing Excel spreadsheet (about 3.5 MB) and creating a
new HSSFWorkbook, our entire WebSphere app server hangs up.  Once the
workbook is created, all is well again.  As far as we can tell, there
are plenty of system resources available (CPU and memory).  The POI
version that we are using is 2.0 RC1.

 

Anyone run into a similar problem?

 

Thanks in advance...

 

 


Re: Locking up Application Server when creating new HSSFWorkbook

Posted by "Andrew C. Oliver" <ac...@apache.org>.
Are you able to use JDK 1.42?  Secondly are you able to tune the garbage
collection (-X parameters to the VM) on WebSphere?

To be brutally honest, if you have the choice use either JBoss or WebLogic.
Obviously I'm partial to JBoss but either are decent appservers.  I do not
feel the same for WebSphere.

Not that we're not partially at fault.  Our next major version will go after
memory/object counts.

-Andy
-- 
Andrew C. Oliver
http://www.superlinksoftware.com/poi.jsp
Custom enhancements and Commercial Implementation for Jakarta POI

http://jakarta.apache.org/poi
For Java and Excel, Got POI?

The views expressed in this email are those of the author and are almost
definitely not shared by the Apache Software Foundation, its board or its
general membership.  In fact they probably most definitively disagree with
everything espoused in the above email.

> From: Michael Zalewski <za...@optonline.net>
> Reply-To: "POI Users List" <po...@jakarta.apache.org>
> Date: Tue, 06 Jan 2004 20:11:48 -0500
> To: POI Users List <po...@jakarta.apache.org>
> Subject: RE: Locking up Application Server when creating new HSSFWorkbook
> 
> I have also had similar problems (Websphere 4.0). I think in my case it was
> because of an excessive number of objects being created and destroyed (i.e.,
> garbage collection tool several seconds). But I never fully diagnosed the
> problem (And I am not even sure that the problem was due to POI).
> 
> I don't know what you mean when you say 'Websphere app server hangs up'. Do
> you mean that there is no response from the admin console? No response from
> any servlet? Or just no response from the servlet that creates a
> HSSFWorkbook? Do you have a load balanced environment? Could session
> serialization be a problem? (Are you putting the HSSFWorkbook into a
> HttpSession, and letting Websphere try to persist the session?) Are you
> trying to send a large spreadsheet to the client with https?
> 
> You could try the following:
> 
> 1) Use Websphere's own internal HTTP Server, instead of Apache/IIS/Netscape
> 
> 2) Lower the amount of heap memory used. See if that makes the lockups more
> frequent.
> 
> 3) Turn on Garbage Collection tracing. See if generating the HSSFWorkbook
> causes many sweeps.
> 
> I think that Garbage Collection is the most likely culprit. (A JVM can do
> very little while a garbage collection is in process. That would cause your
> application to freeze. But the Admin Console and other application servers
> should continue to respond).
> 
> If the problem is limited to a single servlet, you might also be
> synchronizing the servlet object on the request. For example, if there is a
> servlet that implements SingleThreadModel, (or if you set it up that way in
> web.xml), then subsequent requests for workbooks will appear to freeze until
> the first workbook is completely downloaded.
> 
> -----Original Message-----
> From: Pat.Klein@moorewallace.com [mailto:Pat.Klein@moorewallace.com]
> Sent: Tuesday, January 06, 2004 11:26 AM
> To: poi-user@jakarta.apache.org
> Subject: Locking up Application Server when creating new HSSFWorkbook
> 
> We are running into a strange issue on our application.  When we are
> reading in an existing Excel spreadsheet (about 3.5 MB) and creating a
> new HSSFWorkbook, our entire WebSphere app server hangs up.  Once the
> workbook is created, all is well again.  As far as we can tell, there
> are plenty of system resources available (CPU and memory).  The POI
> version that we are using is 2.0 RC1.
> 
> 
> 
> Anyone run into a similar problem?
> 
> 
> 
> Thanks in advance...
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


RE: Locking up Application Server when creating new HSSFWorkbook

Posted by Michael Zalewski <za...@optonline.net>.
I have also had similar problems (Websphere 4.0). I think in my case it was
because of an excessive number of objects being created and destroyed (i.e.,
garbage collection tool several seconds). But I never fully diagnosed the
problem (And I am not even sure that the problem was due to POI).

I don't know what you mean when you say 'Websphere app server hangs up'. Do
you mean that there is no response from the admin console? No response from
any servlet? Or just no response from the servlet that creates a
HSSFWorkbook? Do you have a load balanced environment? Could session
serialization be a problem? (Are you putting the HSSFWorkbook into a
HttpSession, and letting Websphere try to persist the session?) Are you
trying to send a large spreadsheet to the client with https?

You could try the following:

1) Use Websphere's own internal HTTP Server, instead of Apache/IIS/Netscape

2) Lower the amount of heap memory used. See if that makes the lockups more
frequent.

3) Turn on Garbage Collection tracing. See if generating the HSSFWorkbook
causes many sweeps.

I think that Garbage Collection is the most likely culprit. (A JVM can do
very little while a garbage collection is in process. That would cause your
application to freeze. But the Admin Console and other application servers
should continue to respond).

If the problem is limited to a single servlet, you might also be
synchronizing the servlet object on the request. For example, if there is a
servlet that implements SingleThreadModel, (or if you set it up that way in
web.xml), then subsequent requests for workbooks will appear to freeze until
the first workbook is completely downloaded.

-----Original Message-----
From: Pat.Klein@moorewallace.com [mailto:Pat.Klein@moorewallace.com]
Sent: Tuesday, January 06, 2004 11:26 AM
To: poi-user@jakarta.apache.org
Subject: Locking up Application Server when creating new HSSFWorkbook

We are running into a strange issue on our application.  When we are
reading in an existing Excel spreadsheet (about 3.5 MB) and creating a
new HSSFWorkbook, our entire WebSphere app server hangs up.  Once the
workbook is created, all is well again.  As far as we can tell, there
are plenty of system resources available (CPU and memory).  The POI
version that we are using is 2.0 RC1.



Anyone run into a similar problem?



Thanks in advance...






---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: Locking up Application Server when creating new HSSFWorkbook

Posted by "Andrew C. Oliver" <ac...@apache.org>.
No but here are some suggestions:

1. Check file handles.  WebSphere eats them like they're going out of style!
2. used BufferedInputStreams
3. Tune your garbage collector and use parallel garbage collector if
possible (jdk 1.4.2+)
4. Is the number of threads for your servlet container...close to 1??
5. Do you have a fat synchronized block containing this code?
-- 
Andrew C. Oliver
http://www.superlinksoftware.com/poi.jsp
Custom enhancements and Commercial Implementation for Jakarta POI

http://jakarta.apache.org/poi
For Java and Excel, Got POI?

The views expressed in this email are those of the author and are almost
definitely not shared by the Apache Software Foundation, its board or its
general membership.  In fact they probably most definitively disagree with
everything espoused in the above email.

> From: <Pa...@moorewallace.com>
> Reply-To: "POI Users List" <po...@jakarta.apache.org>
> Date: Tue, 6 Jan 2004 10:26:22 -0600
> To: <po...@jakarta.apache.org>
> Subject: Locking up Application Server when creating new HSSFWorkbook
> 
> We are running into a strange issue on our application.  When we are
> reading in an existing Excel spreadsheet (about 3.5 MB) and creating a
> new HSSFWorkbook, our entire WebSphere app server hangs up.  Once the
> workbook is created, all is well again.  As far as we can tell, there
> are plenty of system resources available (CPU and memory).  The POI
> version that we are using is 2.0 RC1.
> 
> 
> 
> Anyone run into a similar problem?
> 
> 
> 
> Thanks in advance...
> 
> 
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org