0

I have a java application with jodConverter. I can convert all types of extensions to PDF and it works good but when I put it as web application a timeout occurs when converting big docs. The same computer has the web application and the normal application.

Normal application, converts all docs. Web application, doesn't convert big docs eventually a timeout occurs.

I use websphere portal 7 as server.

Anyone have some idea for this issue?

Edit: I tried to install the wildfly and the application works good, so the problem maybe is in websphere server.

I have this exception:

    org.artofsolving.jodconverter.office.OfficeException: task did not complete within timeout
 org.artofsolving.jodconverter.office.PooledOfficeManager.execute(PooledOfficeManager.java:88)
 org.artofsolving.jodconverter.office.ProcessPoolOfficeManager.execute(ProcessPoolOfficeManager.java:78)
org.artofsolving.jodconverter.OfficeDocumentConverter.convert(OfficeDocumentConverter.java:78)
servlets.ConversorToPdf.converteFiles(ConversorToPdf.java:125)
 servlets.ConversorToPdf.processa(ConversorToPdf.java:71)
 servlets.ConversorToPdf.doGet(ConversorToPdf.java:55)
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:1655)
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:937)
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
 com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
 com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
 com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
 com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
 com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
 com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
 com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
 com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)


Caused by: java.util.concurrent.TimeoutException
 java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:240)
java.util.concurrent.FutureTask.get(FutureTask.java:103)
org.artofsolving.jodconverter.office.PooledOfficeManager.execute(PooledOfficeManager.java:85)
Montag451
  • 1,168
  • 3
  • 14
  • 30
Queiros
  • 1
  • 1
  • 6
  • If it only fails for big documents, try to increase min and max heap size for the server, defaults are too small. How long is it working before timeout? – Gas Jun 18 '14 at 14:01
  • i increase min and max heap size but notihng (min 1024, max 4096), same issue. I have 4 minutes time out, but i put 12m and server wait 12m and do timeout. On another server works fine. Big documents = 20 or more pages, with +- 1,6mb. Server Websphere portal 7 – Queiros Jun 18 '14 at 14:20
  • It seems that the application releases the connection to the oppenoffice or libreoffice and connects but then it looks like blocks and nothing else happens until the timeout. The process of openoffice is cast. – Queiros Jun 18 '14 at 14:31
  • Now i install openoffice 4.1 and dont give timeout for convert docs with +- 40 pages but when docs have +- 70 give timeout. – Queiros Jun 18 '14 at 15:08
  • The other working server, is it on the same platform/machine, same jdk major version? You could dump the threads to see which thread is waiting. – Gas Jun 18 '14 at 15:41
  • yes, same machine and same jdk. – Queiros Jun 18 '14 at 16:12
  • when process work go for 50k, 60k memory but when dont work only said 30k until the end. – Queiros Jun 18 '14 at 16:43
  • I don't have any more good ideas. Contact jodconverter developers or raise PMR in IBM Support. – Gas Jun 18 '14 at 18:31

1 Answers1

0

maybe set application.properties increase taskExecutionTimeout value

jodconverter.local.taskExecutionTimeout=200000
Sidharth Mudgil
  • 1,293
  • 8
  • 25