Thanks I will follow that

On Tue, Aug 17, 2010 at 6:12 PM, Pid <p...@pidster.com> wrote:

> On 17/08/2010 10:48, sasidhar prabhakar wrote:
> > Tomcat hangs ever few hours.
>
> *Exact* Tomcat, JVM and OS versions?
>
> > In server.xml maxThreads are 300.
> >
> > In thread dump I observed every thread doing the same thing.
> > In my code I sends sms to users by using HttpURLConnection.
> > I am using this code for months I didn't get the problem earlier.
> > For few days I am getting this problem consistently. Whenever tomcat
> hangs I
> > takes the thread dump,
> > every time it shows the same results.
> >
> > Here is my one of threads dump. this is common for all remaining threads.
> >
> > Somebody guide me to solve this problem. I am trying but unable to do
> this
>
> If each request processor thread is dependent on an inline request to an
> external resource, and that resource is unavailable or otherwise slow to
> respond then your app will inevitably run out of threads.
>
> You should consider offloading the request to a thread pool (see the
> Java Concurrency API in recent JVMs) with appropriate timeouts.
>
>
> p
>
> > "http-80-300" daemon prio=1 tid=0x76890ef0 nid=0x6bb6 runnable
> > [0x6def0000..0x6def0db0]
> >     at java.net.SocketInputStream.socketRead0(Native Method)
> >     at java.net.SocketInputStream.read(SocketInputStream.java:129)
> >     at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> >     at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
> >     at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
> >     - locked <0xb1332658> (a java.io.BufferedInputStream)
> >     at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:681)
> >     at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:626)
> >     at
> >
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:983)
> >     - locked <0xb1332690> (a sun.net.www.protocol.http.HttpURLConnection)
> >     at SendSms.sendToSingleRecipientNoNpri(SendSms.java:89)
> >     at CreateAccountAction.execute(CreateAccountAction.java:86)
> >     at
> >
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
> >     at
> >
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
> >     at
> > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
> >     at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> >     at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> >     at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> >     at
> com.amulyam.servlet.RedirectFilter.doFilter(RedirectFilter.java:56)
> >     at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> >     at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> >     at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> >     at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> >     at
> >
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
> >     at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> >     at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> >     at
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> >     at
> >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
> >     at
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
> >     at
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> >     at
> > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
> >     at java.lang.Thread.run(Thread.java:595)
> >
>
>

Reply via email to