I'm running my web application on IBM WebSphere.
There is a warning message in System.out.log :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | [4/25/16 17:16:03:756 CST] 00000068 SystemOut O [2016-04-25 17:16:03][WARN][Deferrable Alarm : 1][Line:1709][com.ibm.ws.runtime.component.ThreadMonitorImpl.logToJSR47Logger]WSVR0605W: Thread "WebContainer : 6" (000000d3) has been active for 667,910 milliseconds and may be hung. There is/are 1 thread(s) in total in the server that may be hung. at java.io.RandomAccessFile.readBytes(Native Method) at java.io.RandomAccessFile.read(RandomAccessFile.java:368) at org.apache.fontbox.ttf.BufferedRandomAccessFile.fillBuffer(BufferedRandomAccessFile.java:122) at org.apache.fontbox.ttf.BufferedRandomAccessFile.read(BufferedRandomAccessFile.java:160) at org.apache.fontbox.ttf.RAFDataStream.read(RAFDataStream.java:162) at org.apache.fontbox.ttf.TTFDataStream.read(TTFDataStream.java:263) at org.apache.fontbox.ttf.TTFDataStream.readString(TTFDataStream.java:91) at org.apache.fontbox.ttf.TTFDataStream.readString(TTFDataStream.java:64) at org.apache.fontbox.ttf.TTFParser.readTableDirectory(TTFParser.java:232) at org.apache.fontbox.ttf.TTFParser.parse(TTFParser.java:139) at org.apache.fontbox.ttf.TTFParser.parse(TTFParser.java:87) at org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.addTrueTypeFont(FileSystemFontProvider.java:502) at org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.scanFonts(FileSystemFontProvider.java:246) at org.apache.pdfbox.pdmodel.font.FileSystemFontProvider.<init>(FileSystemFontProvider.java:225) at org.apache.pdfbox.pdmodel.font.FontMapperImpl$DefaultFontProvider.<clinit>(FontMapperImpl.java:132) at java.lang.J9VMInternals.initializeImpl(Native Method) at java.lang.J9VMInternals.initialize(J9VMInternals.java:236) at org.apache.pdfbox.pdmodel.font.FontMapperImpl.getProvider(FontMapperImpl.java:151) at org.apache.pdfbox.pdmodel.font.FontMapperImpl.findFont(FontMapperImpl.java:415) at org.apache.pdfbox.pdmodel.font.FontMapperImpl.getTrueTypeFont(FontMapperImpl.java:323) at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.<init>(PDTrueTypeFont.java:198) at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:75) at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:123) at org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:60) at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:815) at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:472) at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:446) at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149) at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:189) at org.apache.pdfbox.rendering.PDFRenderer.renderPage(PDFRenderer.java:208) at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:139) at org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:94) |
And my function is hung after I click execute button.
How-to
You need to log into WAS administration console, then go to Servers > Application Servers > server_name. Click Administration > Custom Properties Under Server Infrastructure.
And add four arbitrates
- com.ibm.websphere.threadmonitor.interval: 180
- com.ibm.websphere.threadmonitor.threshold: 600
- com.ibm.websphere.threadmonitor.false.alarm.threshold: 100
- com.ibm.websphere.threadmonitor.dump.java: false
Remember to save attributes and restart WAS.
But this is just a workaround solution, it may means your programs may consume lots of memory for some reasons. You still need to figure out its root causes and fix them.
Reference
[1] http://websphere-solutions.blogspot.tw/2011/10/hung-threads.html
No comments:
Post a Comment