websphere - Hung theads | java.io.FileInputStream.open(Native Method) | NFS server -
we have 4 lpars running 1 java instance each.
they lot of read/write operations shared nfs server. when nfs server goes down abruptly, threads trying read image in each of these 4 servers gets hung state.
below trace shows same (process websphere applciation server process)
while working on issues in nfs server side, there way avoid code side?
if underlying connection tcp based (which assume is), should tcp read/connect timeout take care of this? want thread returned pool instead of waiting infinitely other side repond.
or should taken care nfs 'client' on source machine? config setting on client side pertaining nfs (since fileinputstream.open not know whether file trying read on local server or shared folder in nfs server)
thanks in advance answers :)
we using
java 1.6 on 7.0
[8/2/15 19:52:41:219 gst] 00000023 threadmonitor w wsvr0605w: thread "webcontainer : 77" (00003c2b) has been active 763879 milliseconds , may hung. there is/are 110 thread(s) in total in server may hung. @ java.io.fileinputstream.open(native method) @ java.io.fileinputstream.(fileinputstream.java:113) @ java.io.fileinputstream.(fileinputstream.java:73) @ org.emarapay.presentation.common.util.imageservlet.processrequest(unknown source) @ org.emarapay.presentation.common.util.imageservlet.doget(unknown source) @ javax.servlet.http.httpservlet.service(httpservlet.java:718) @ javax.servlet.http.httpservlet.service(httpservlet.java:831) @ com.ibm.ws.webcontainer.servlet.servletwrapper.service(servletwrapper.java:1694) @ com.ibm.ws.webcontainer.servlet.servletwrapper.service(servletwrapper.java:1635) @ com.ibm.ws.webcontainer.filter.webappfilterchain.dofilter(webappfilterchain.java:113) @ com.ibm.ws.webcontainer.filter.webappfilterchain._dofilter(webappfilterchain.java:80) @ com.ibm.ws.webcontainer.filter.webappfiltermanager.dofilter(webappfiltermanager.java:908) @ com.ibm.ws.webcontainer.servlet.servletwrapper.handlerequest(servletwrapper.java:965) @ com.ibm.ws.webcontainer.servlet.servletwrapper.handlerequest(servletwrapper.java:508) @ com.ibm.ws.webcontainer.servlet.servletwrapperimpl.handlerequest(servletwrapperimpl
check solution https://stackoverflow.com/a/9832633/1609655
you can similar reading image. wrap call read in java future implementation , signal thread kill when operation not finish in specified amount of time.
it might not perfect, atleast prevent server stuck ever.
Comments
Post a Comment