Skip to main content

GrizzlyServiceListener: Interrupting idle Thread: http-thread-pool-8001-(1)

22 replies [Last post]
cf126330
Offline
Joined: 2005-03-29

GlassFish v 3.0.1 b15

One of my test apps have been working up till b14, but saw some failures with b15. These apps all involves concurrency and thread waiting. Any recent changes in GF that might have caused this?

On the client I got these error

Failed to connect to the test webapp.java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1072)

I'm seeing these WARNING in server.log while running my app:

[#|2010-04-27T12:00:50.555-0400|WARNING|glassfish3.0|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=15;_ThreadName=Thread-1;|Interrupting idle Thread: http-thread-pool-8001-(1)|#]

[#|2010-04-27T12:01:20.566-0400|WARNING|glassfish3.0|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=15;_ThreadName=Thread-1;|Interrupting idle Thread: http-thread-pool-8001-(2)|#]

This is the only warning/error/exception in server.log.

Thanks in advance.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Sondra

There was mention that his issue would be fixed soon. Is it currently
available in a released version?

--
View this message in context: http://old.nabble.com/GrizzlyServiceListener%3A-Interrupting-idle-Thread...
Sent from the java.net - glassfish users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

cf126330
Offline
Joined: 2005-03-29

Thanks, Alexey.
Is there an issue created so that we can keep track?

Oleksiy Stashok

Hi,

we have one, but unfortunately it's internal :(
But really, we've fixed that and you'll see the change very soon :)

WBR,
Alexey.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Oleksiy Stashok

This is known issue and supposed to be fixed in the next build.

WBR,
Alexey.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

hgoz
Offline
Joined: 2010-11-10

What is the last status of this issue ? I can not see a bug fix for Glassfish 3 b28 which is i'm already using.

Thanks.

visumagic
Offline
Joined: 2006-05-24

Any update on this issue, i'm also facing same issue.

In my case , I'm trying to upload large file from client. In the middle of uploading I found the following failure message. Please suggest.
[#|2011-01-03T07:23:08.376+0000|WARNING|glassfish3.0.1|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=42;_ThreadName=Thread-1;|Interrupting idle Thread: http-thread-pool-8080-(5)|#]

[#|2011-01-03T07:23:08.378+0000|SEVERE|glassfish3.0.1|ambivo.web.imports.ImportServletOld1|_ThreadID=48;_ThreadName=Thread-1;|The log message is null.
org.apache.commons.fileupload.MultipartStream$MalformedStreamException: Stream ended unexpectedly
at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:982)
at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:886)

-raghu

babbarkrishan
Offline
Joined: 2007-01-18

Hi
I am also getting the same issue. Kindly let me know the status and if there is any version having fixed of this issue?
We posted the same problem at various fourms. Please see any of the following URLs for the details and if someone can help to resolve this issue will be a great help.
http://www.java.net/forum/topic/glassfish/glassfish/large-file-upload-gi...
http://stackoverflow.com/questions/5026338/large-file-upload-giving-exce...
http://java.net/jira/browse/GRIZZLY-811
http://www.java.net/node/695745#comment-812733
http://www.java.net/forum/topic/glassfish/glassfish/large-file-upload-gi...
Thanks
Krishan Babbar

mgainty
Offline
Joined: 2004-05-21

depends on 2 factors:
1)which package are you implementing fileupload (most folks use commons-fileupload)..be aware most packages support max-buffer-size
2)the implemented connector ..NIO connectors on HTTP1.1 connection are the best connectors for heavy and/or intermittent loads

this problem is difficult to diagnose if we can't see the stacktrace and log

if the problem *is* specific to grizzly you may want to consider testing out on a NIO (http1.1) supported connector

Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

> To: users@glassfish.java.net
> Subject: Re: Any update on this issue,
> From: forums@java.net
> Date: Thu, 17 Mar 2011 09:12:31 -0500
>
> Hi
>
> I am also getting the same issue. Kindly let me know the status and if there
> is any version having fixed of this issue?
>
> We posted the same problem at various fourms. Please see any of the following
> URLs for the details and if someone can help to resolve this issue will be a
> great help.
>
> http://www.java.net/forum/topic/glassfish/glassfish/large-file-upload-gi...
> http://stackoverflow.com/questions/5026338/large-file-upload-giving-exce...
> http://java.net/jira/browse/GRIZZLY-811
> http://www.java.net/node/695745#comment-812733
> http://www.java.net/forum/topic/glassfish/glassfish/large-file-upload-gi...
>
> Thanks
> Krishan Babbar
>
>

babbarkrishan
Offline
Joined: 2007-01-18

Thanks Martin,
It would be great if you can provide any sample code or reference URLs for "the implemented connector ..NIO connectors on HTTP1.1 connection".
I guess max-buffer-size is not the problem because some times we are able to upload 30+ GB of data by using 20+ instances and sometimes it breaks for few instances out of 20 instances with following warning in server.log (in case of Glassfish)
WARNING|glassfish3.0.1|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=17;_ThreadName=Thread-1;|Interrupting idle Thread: http-thread-pool-9876-(17)|#]
Thanks
Krishan Babbar

oleksiys
Offline
Joined: 2006-01-25

Hi,

please increase the HTTP request processing timeout (default value is
15mins) by setting

asadmin set
server-config.network-config.protocols.protocol.http-listener-1.http.request-timeout-seconds=NNN

where NNN the max number of *seconds* one single request might be
processing by a thread.
As I told the default value is 15mins, which means NNN=900, so you can
set any higher value.

Hope this will help.

WBR,
Alexey.

On 03/17/2011 03:12 PM, forums@java.net wrote:
> Hi
>
> I am also getting the same issue. Kindly let me know the status and if
> there
> is any version having fixed of this issue?
>
> We posted the same problem at various fourms. Please see any of the
> following
> URLs for the details and if someone can help to resolve this issue
> will be a
> great help.
>
> http://www.java.net/forum/topic/glassfish/glassfish/large-file-upload-gi...
>
> http://stackoverflow.com/questions/5026338/large-file-upload-giving-exce...
>
> http://java.net/jira/browse/GRIZZLY-811
> http://www.java.net/node/695745#comment-812733
> http://www.java.net/forum/topic/glassfish/glassfish/large-file-upload-gi...
>
>
> Thanks
> Krishan Babbar
>
>

babbarkrishan
Offline
Joined: 2007-01-18

Thanks Alexey,
We have already increased this to 9000 seconds.
Regards,
Krishan Babbar

oleksiys
Offline
Joined: 2006-01-25

And still you see that timeout?

babbarkrishan
Offline
Joined: 2007-01-18

Yes, Still i am getting the same issue.
Yesterday, we installed latest Glassfish 3.1 & modified the configurations related to timeout, but in that too we are getting the same timeout warning in logs.
We thought this issue would be fixed in latest issue but its not.
Thanks
Krishan Babbar

flevo024
Offline
Joined: 2011-04-20

Dear Babbarkrishan,
I'm also getting this error message with Glassfish 3.0.1 (build 22). I''ve noticed that these warnings came more frequently as the amount of concurrent users increased. It used to be once in 2 weeks and now it's almost everyday. Especially in the morning when the users login. Sadly, in my situation we have to restart Glassfish as soon we notice these warnings in the server.log.
Did you succeed in finding a solution to this problem?
Kind Regards,
Gilbert

oleksiys
Offline
Joined: 2006-01-25

Can you pls. provide your domain.xml and steps to reproduce the issue?

Thanks.

Alexey.

ucrkarthik
Offline
Joined: 2010-09-18

I know this thread is old but has anyone found a solution? I am getting the following error:

[#|2012-10-16T13:43:00.929-0700|WARNING|oracle-glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=23;_ThreadName=Thread-2;|StandardWrapperValve[applicationContext-mvc]: PWC1406: Servlet.service() for servlet applicationContext-mvc threw exception
org.apache.commons.fileupload.MultipartStream$MalformedStreamException: Stream ended unexpectedly
at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:982)
at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:886)
at java.io.InputStream.read(InputStream.java:82)
at org.apache.commons.fileupload.util.Streams.copy(Streams.java:96)
at org.apache.commons.fileupload.util.Streams.copy(Streams.java:66)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:366)
at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
at org.springframework.web.multipart.commons.CommonsMultipartResolver.parseRequest(CommonsMultipartResolver.java:156)
at org.springframework.web.multipart.commons.CommonsMultipartResolver.resolveMultipart(CommonsMultipartResolver.java:139)
at org.springframework.web.servlet.DispatcherServlet.checkMultipart(DispatcherServlet.java:1020)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:883)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)

Sanila
Offline
Joined: 2012-06-16

I am also getting the same exception
WARNING: GRIZZLY0023: Interrupting idle Thread: http-thread-pool-8080(5)
After downloading an excel file, when i click another action , the server is showing the message
WARNING: GRIZZLY0023: Interrupting idle Thread: http-thread-pool-8080(5)

and not able to proceed.
My application is using JSF2, Glassfish v3.1.2 and JDK7.

Please help me in solving this.

oleksiys
Offline
Joined: 2006-01-25

If you use Glassfish 3.1.2.2 pls. try to apply this patch [1].
Before doing that pls. remove the osgi-cache folder [2].

[1] http://forums.java.net/forum/topic/glassfish/glassfish/what-causes-grizz...

[2] glassfish3/glassfish/domains/domain1/osgi-cache

Sanila
Offline
Joined: 2012-06-16

Hi Oleksiys,

I applied the patch after deleting the osgi-cache folder.
But i was not able to start the server.
Getting the following exception

The server exited prematurely with exit code 1.
Before it died, it produced the following output:

Launching GlassFish on Felix platform
Completed shutdown of GlassFish runtime
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMa
in.java:97)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
Caused by: com.sun.enterprise.module.ResolveError: Failed to start Bundle Id [98
] State [INSTALLED] [org.glassfish.main.common.glassfish-mbeanserve
r(Glassfish MBeanServer support):3.1.2.b14]
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:17
7)

Please help...

oleksiys
Offline
Joined: 2006-01-25

Hi Sanila,

just to make sure, are you using Glassfish 3.1.2.2? Cause the patch has to work w/ 3.1.2.2 only.

Thanks.

Sanila
Offline
Joined: 2012-06-16

Hi Oleksiys,

I've tried using a fresh Glassfish3.1.2.2 and able to start the GF server after applying the patch.

But my issue didn't get solved.
Getting the message Interrupting the idle thread in the log and not able to proceed to any pages in the application. Sometimes i am getting outOfmemory error also.

Thanks,
Sanila

oleksiys
Offline
Joined: 2006-01-25

Hi Sanila,

the interrupted message/warning itself is not a bug, it is just an indicator that HTTP request processing (Servlet execution) takes longer than expected (expectation is set by request-timeout setting). You can always disable this feature by setting request-timeout to -1 on an appropriate http-listener like [1]. The default timeout value is set to 15mins, it means one single servlet execution takes longer than 15mins! If this is ok - then just disable the timeout [1], if this is not ok - then there should be something wrong w/ the servlet/webapplication code.

Thanks.

WBR,
Alexey.

[1] asadmin set server-config.network-config.protocols.protocol.http-listener-1.http.request-timeout-seconds=-1