4 Replies Latest reply on Dec 21, 2017 11:52 AM by 949766

    ORDS and glassfish settings for production environment

    Maahjoor

      dear all,

       

      we are using oracle apex 5.0 on glassfish 4 with oracle 12c on windows server 2012.

      we have student exams and 100 students need to be connected to apex and issue queries from sql commands interface from apex.

      we are using ords 3.0 and deployed on glassfish server.

       

      during the exam, all of the sudden the apex disconnected with 500 internal server error.

      we have to restart ords and glassfish server in order to enable the students to login.

       

      tomorrow is another paper. kindly suggest for us how to fine tune the ords or glassfish so that i can bare the load.

      below is the default.xml file from ords.

       

      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
      <properties>
      <comment>Saved on Thu Sep 22 14:23:12 GST 2016</comment>
      <entry key="cache.caching">false</entry>
      <entry key="cache.directory">/tmp/apex/cache</entry>
      <entry key="cache.duration">days</entry>
      <entry key="cache.expiration">7</entry>
      <entry key="cache.maxEntries">500</entry>
      <entry key="cache.monitorInterval">60</entry>
      <entry key="cache.procedureNameList"/>
      <entry key="cache.type">lru</entry>
      <entry key="db.hostname">10.153.4.198</entry>
      <entry key="db.port">1521</entry>
      <entry key="db.servicename">orcl1.hct.org</entry>
      <entry key="debug.debugger">false</entry>
      <entry key="debug.printDebugToScreen">false</entry>
      <entry key="error.keepErrorMessages">true</entry>
      <entry key="error.maxEntries">50</entry>
      <entry key="jdbc.DriverType">thin</entry>
      <entry key="jdbc.InactivityTimeout">3600</entry>
      <entry key="jdbc.InitialLimit">500</entry>
      <entry key="jdbc.MaxConnectionReuseCount">50000</entry>
      <entry key="jdbc.MaxLimit">5000</entry>
      <entry key="jdbc.MaxStatementsLimit">100</entry>
      <entry key="jdbc.MinLimit">3000</entry>
      <entry key="jdbc.statementTimeout">1500</entry>
      <entry key="log.logging">false</entry>
      <entry key="log.maxEntries">50</entry>
      <entry key="misc.compress"/>
      <entry key="misc.defaultPage">apex</entry>
      <entry key="security.crypto.enc.password">B6xN3G9T5s_XMIT7QBxNWQ..</entry>
      <entry key="security.crypto.mac.password">7YrxJ8tv3qeL1v7ejMj0Yg..</entry>
      <entry key="security.disableDefaultExclusionList">false</entry>
      <entry key="security.maxEntries">2000</entry>
      </properties>
      
      
        • 1. Re: ORDS and glassfish settings for production environment
          thatJeffSmith-Oracle

          >>during the exam, all of the sudden the apex disconnected with 500 internal server error.

          When you comb through the server logs, what do you see?

          1 person found this helpful
          • 2. Re: ORDS and glassfish settings for production environment
            Maahjoor

            hi,

             

            can you guide us which logs to check? we tried ORDS folder for logs but could not find any logs folder.

            before that ORA-01000: maximum open cursors errror was comming and apex users were not able to run queries. we fix it by increasing the open_cursors value to 4000 both on pdb and cdb.

            then this 500 internal server error start coming.

             

            thank you.

            • 3. Re: ORDS and glassfish settings for production environment
              949766

              Just a couple of observations:

               

              1) Your jdbc connection settings seem very high for 100 students - we are using settings of "<entry key="jdbc.MaxLimit">30</entry>" for 200 users - your app server will be attempting to establish 3000 connections (your minimum) to the database.  In general connections will be shared and Glasfish will queue requests if they are all busy.  I would be very tempted to reduce this down to limit the traffic into the database - and quitely queue requests.  If you app is written cleanly, no long running transactions then less may be more.

               

              2) We have recently gone through a process of reducing "jdbc.MaxConnectionReuseCount" down to 300 - rather than increasing it.  This is the number of requests it handles before closing and re-establishing (if required) - this was because connections in APEX were consuming memory and only recycling the jdbc session clears this down.  So again lowering the figure gave us better longer term running.

               

              So I would suggest you monitor the number of APEX_* user connections during a reasonable load

              • 4. Re: ORDS and glassfish settings for production environment
                949766

                With Glassfish ORDS logs are in the Glassfish server.log  e.g. /usr/lib/glassfish/domains/<mydomain>/logs/server.log