Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 7.4.2, 7.4.3
    • Fix Version/s: 7.5.2
    • Labels:
      None
    • Environment:

      tested on Windows 7, Bonita Studio

    • Edition:
      Community
    • Reference:
      BS-16482
    • Steps to reproduce:
      Hide
      1. Import attached RestApiTestPage
      2. Install attached rest-api-extension.zip
      3. Preview page - random page parts are not loaded correctly
      Show
      1. Import attached RestApiTestPage 2. Install attached rest-api-extension.zip 3. Preview page - random page parts are not loaded correctly

      Description

      Hi,

      I am struggling with the REST API extension issue.

      When multiple requests to API are sent at the same time, some of them are not executed properly. In the example I am sharing, API should return paged list of natural numbers. On the test page I declare 6 external API variables for 6 subsequent pages and I am listing them in 6 colums. Some responses contain an array of numbers as expected. Some of them just contain a file system error "The system cannot find the path specified" or "Low disk space". There is also an entry in catalina.log:

      INFO: org.apache.coyote.http11.Http11Processor An error occurred in processing while on a non-container thread. The connection will be closed immediately
      java.net.SocketException: Software caused connection abort: socket write error
      	at java.net.SocketOutputStream.socketWrite0(Native Method)
      	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
      	at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
      	at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:215)
      	at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480)
      	at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:119)
      	at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:801)
      	at org.apache.coyote.Response.action(Response.java:172)
      	at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:363)
      	at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:331)
      	at org.apache.catalina.connector.Response.flushBuffer(Response.java:611)
      	at org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:306)
      	at org.springframework.http.server.ServletServerHttpResponse.flush(ServletServerHttpResponse.java:90)
      	at org.springframework.web.socket.sockjs.transport.session.AbstractHttpSockJsSession.writeFrameInternal(AbstractHttpSockJsSession.java:345)
      	at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.writeFrame(AbstractSockJsSession.java:325)
      	at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.sendHeartbeat(AbstractSockJsSession.java:249)
      	at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession$1.run(AbstractSockJsSession.java:269)
      	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      I have also noticed that every request creates a folder like tomcat\server\temp\bonita_portal_12724@hostname\tenants\1\custompage_restExtension1491231062900
      The entry in bonita.log says that I can remove it after restart:

      WARNING: org.bonitasoft.console.common.server.page.CustomPageDependenciesResolver The custom page temporary lib directory C:\BonitaBPMCommunity-7.4.2\workspace\tomcat\server\temp\bonita_portal_12724@hostname\tenants\1\custompage_restExtension1491231928852 cannot be deleted. This is likely to be due to a JDK bug on Windows. You can safely delete it after a server restart.
      

      But simple calculation tells me that if I have a ~10MB extension and 1 request per second I'll be forced to restart the system every day if I had a 1TB disk space only for requests temp data (which is exactly the same all the time). I assume, the issue does not occur on Unix systems but still I would not expect dropping the classloader content to the filesystem.

      Why does it behave like that? It is making REST API Extension unusable and littering the filesystem with tons of redundant data.

        Attachments

          Activity

            People

            • Assignee:
              antoine.mottier Antoine Mottier
              Reporter:
              mmichalak Maciej Michalak
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: