Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Lisa Simpson
Tomcat Error
June 9, 2010 1:56 PM
Answer

Lisa Simpson

Rank: Liferay Legend

Posts: 2034

Join Date: March 5, 2009

Recent Posts

I'm running a tomcat bundle from you guys and you need to upgrade your tomcat, if you haven't already. There is a bug in tomcat with the AJP connection handling... I'm pasting this in from the JSP Wiki pages -

Depending on your Tomcat version, you may have experienced this problem due to a bug introduced in Tomcat 6 with the keepAliveTimeout feature in Coyote's AJP protocol. The nature of this problem was caused by Tomcat failing to close sockets after the keepAliveTimeout expired. The Tomcat sockets would remain in a CLOSE_WAIT state but the corresponding mod_jk sockets would close as normal. Since, sockets correspond directory to file descriptors, after some amount of usage and time, Tomcat would run out of available file descriptors and hang indefinitely. This bug was fixed in SVN commit r589062 and released in Tomcat 6.0.15 (http://tomcat.apache.org/tomcat-6.0-doc/changelog.html Harmonize with HTTP java.io code. Otherwise the socket is not closed.). -- Eric Young

However, I'm seeing it in your bundle that is supposed to have tomcat-6.0.18.
Jon Gilmore
RE: Tomcat Error
February 3, 2011 3:49 AM
Answer

Jon Gilmore

Rank: New Member

Posts: 12

Join Date: August 17, 2010

Recent Posts

We're also running tomcat-6.0.18 and we're seeing exactly the same problem as described, i.e. sockets remain in CLOSE_WAIT, but it only happens intermittently. Did you find a fix for this?
alex wom
RE: Tomcat Error
November 3, 2012 12:23 AM
Answer

alex wom

Rank: Regular Member

Posts: 166

Join Date: May 4, 2009

Recent Posts

Have you solved the problem? I'm running with Liferay 6.0.6 CE, with tomcat 6.0.29. I'm using is java http connector, where I configured maxThreads="300". I have two liferay balanced server, and both became idle with this message:
1INFO: Maximum number of threads (300) created for connector with address null and port 8080

after 6/7 hours and I can observe that
1netstat -an | grep CLOSE_WAIT | wc -l
says to me that there are more than 400 connection in that state. If I improve the maxThreads number the problem move forward in time.
Moreover I have this INFO from log
1INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:..

My doubt is also that this component is missing, but I have seen APR docs and seems that I need to reinstall tomcat, and should be a problem for me because I used the bundle.
Jelmer Kuperus
RE: Tomcat Error
November 3, 2012 3:12 AM
Answer

Jelmer Kuperus

Rank: Liferay Legend

Posts: 1190

Join Date: March 10, 2010

Recent Posts

Try generating a stacktrace on the machines when that happens. Assuming you are using a unix like os :

in 1 terminal >

1tail -n0 -f <tomcat_dir>/log/catalina.out > stackdump.log


then in another terminal

1kill -QUIT <tomcat pid>


Then examine the generated stackdump.log file to see what the http threads are blocking on. TDA might be useful
alex wom
RE: Tomcat Error
November 4, 2012 1:27 AM
Answer

alex wom

Rank: Regular Member

Posts: 166

Join Date: May 4, 2009

Recent Posts

Hi Jelmer,
it's great, I see 400 times something like the stack in the following. There is custom code where I call at com.liferay.portal.kernel.util.DocumentConversionUtil.convert ... to convert a content to pdf. Thanks.
(30 min) later: I suppose it is open office that needs more RAM (with respect to liferay used RAM with the current configuration), because if I restart openoffice it works. Solution: buy more RAM? Work around restart open office hourly emoticon

 1"http-8080-400" daemon prio=10 tid=0x00007fbf782a4000 nid=0x7f01 waiting for monitor entry [0x00007fbf38f50000]
 2   java.lang.Thread.State: BLOCKED (on object monitor)
 3        at com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter.convertInternal(OpenOfficeDocumentConverter.java:116)
 4        - waiting to lock <0x00000007989e6890> (a com.artofsolving.jodconverter.openoffice.connection.SocketOpenOfficeConnection)
 5        at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:104)
 6        at com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter.convertInternal(OpenOfficeDocumentConverter.java:88)
 7        at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:82)
 8        at com.liferay.portlet.documentlibrary.util.DocumentConversionUtil._convert(DocumentConversionUtil.java:143)
 9        at com.liferay.portlet.documentlibrary.util.DocumentConversionUtil.convert(DocumentConversionUtil.java:58)
10        at sun.reflect.GeneratedMethodAccessor650.invoke(Unknown Source)
11        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
12        at java.lang.reflect.Method.invoke(Method.java:597)
13        at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:81)
14        at com.liferay.portal.kernel.util.MethodHandler.invoke(MethodHandler.java:75)
15        at com.liferay.portal.kernel.util.PortalClassInvoker.invoke(PortalClassInvoker.java:40)
16        at com.liferay.portal.kernel.util.DocumentConversionUtil.convert(DocumentConversionUtil.java:29)
17        at it.etc.portlet.docwebdisplay.controller.DocWebDisplayController.getFile(DocWebDisplayController.java:139)
18        at it.etc.portlet.docwebdisplay.controller.DocWebDisplayController.processAction(DocWebDisplayController.java:55)
19        at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:70)
20        at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
21        at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:92)
22        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
23        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
24        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
25        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
26        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
27        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
28        at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:638)
29        at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:687)
30        at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:360)
31        at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:784)
32        at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:582)
33        at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:232)
34        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
35        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
36        at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:153)
37        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
38        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
39...