Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-68195

Connection is closed during document download

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.2.10 EE GA1, 6.2.X EE, Master
    • Fix Version/s: 7.1.X, Master
    • Component/s: DM
    • Labels:
      None

      Description

      1) Apply the following properties to portal-ext:

      jdbc.default.jndi.name=jdbc/LiferayPool
      
      dl.store.impl=com.liferay.portlet.documentlibrary.store.DBStore
      dl.file.max.size=26214400
      

      2) Configure the jdbc/LiferayPool in liferay-portal-6.2.10.1-ee-ga1/tomcat-7.0.42/conf/Catalina/localhost/ROOT.xml as per below:

      	<Resource
      		name="jdbc/LiferayPool"
      		auth="Container"
      		type="javax.sql.DataSource"
      		driverClassName="oracle.jdbc.driver.OracleDriver"
      		url="jdbc:oracle:thin:@192.168.211.148:1521:orcl"
      		username="gemoney17"
      		password="password"
      		maxActive="60" maxIdle="10" maxWait="-1"
      		validationQuery="SELECT 1 FROM DUAL" 
      		testOnBorrow="true" testOnReturn="true"
      	/>
      

      3) Place a ojdbc6.jar in the tomcat/lib/ext folder
      4) Have a DB on Oracle 11.2
      5) Start the portal and login as Admin
      6) Place a DM portlet onto the Welcome page and upload a 20 MB PDF file into it
      7) Add the custom logging level "portal-web.docroot.html.portal.status_jsp" and set it to DEBUG
      8) Run a stress test that:

      • Opens the Welcome page with guest user 5000 times
      • Downloads the PDF file with guest user 5000 times

      (attached jmx file that you can use with jmeter, but you need to edit HTTPSampler.path of the document in it)

      Actual Result: Logs will print:

      12:35:58,991 ERROR [http-bio-8080-exec-152][status_jsp:753] Closed Connection
      12:35:59,215 DEBUG [http-bio-8080-exec-152][status_jsp:756] java.io.IOException: Closed Connection
      java.io.IOException: Closed Connection
      	at oracle.jdbc.driver.OracleBlobInputStream.needBytes(OracleBlobInputStream.java:204)
      	at oracle.jdbc.driver.OracleBufferedStream.readInternal(OracleBufferedStream.java:169)
      	at oracle.jdbc.driver.OracleBufferedStream.read(OracleBufferedStream.java:143)
      	at java.io.FilterInputStream.read(FilterInputStream.java:133)
      	at java.io.PushbackInputStream.read(PushbackInputStream.java:186)
      	at java.io.FilterInputStream.read(FilterInputStream.java:107)
      	at com.liferay.portal.kernel.flash.FlashMagicBytesUtil.check(FlashMagicBytesUtil.java:35)
      	at com.liferay.portal.webserver.WebServerServlet.sendFile(WebServerServlet.java:1024)
      	at com.liferay.portal.webserver.WebServerServlet.service(WebServerServlet.java:260)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      ...
      Caused by: java.sql.SQLRecoverableException: Closed Connection
      	at oracle.sql.BLOB.getDBAccess(BLOB.java:1071)
      	at oracle.sql.BLOB.getBytes(BLOB.java:319)
      	at oracle.jdbc.driver.OracleBlobInputStream.needBytes(OracleBlobInputStream.java:181)
      	... 67 more
      

      Expected Result: No exceptions.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 10 weeks, 1 day ago

                Packages

                Version Package
                7.1.X
                Master