• FEATURES
  • PRICING
  • MARKETPLACE
  • CASE STUDIES
  • BLOG
  • Internal Server Error

    I am occasionally receiving an “Internal Server Error. Contact your administrator” warning when bringing up the Open Specimen login page. After about 10 seconds the error goes away and the user is able to log in. Where can I find more details on what the actual problem is?

    Thanks,

    I had/have a similar issue with an OpenSpecimen/MySQL install. I had configured wait-timeout to be very low expecting a polling network traffic to keep the db connection open. However the connection pool isn’t keeping the connection live once the web app is dormant for a while, or isn’t closing properly. When you refresh the web app after awhile you get internal errors (or “common error”) from the app losing connection up the chain. I increased the wait-time out until I can find a better solution with the connection pool.

    For mysql the config is wait-timeout in the my.cnf file. Your milage may vary…

    -Randy

    Hi @bmumph,

    Its the issue with the database connection. The connection get expire during the long idle time. The latest release i.e. OpenSpecimen-v2.4 installable includes the fix for this.

    For this you have 2 alternatives:

    1. Install OpenSpecimen-v2.4.
    2. Update the datasource configuration in existing installation.

    For #1. You can download the installable from OS releases. For instructions please refer deployment steps.

    For #2. Please follow the below steps:

    • Open context.xml file located at ${TOMCAT_HOME}/conf/context.xml
    • Search for <Resource name=“jdbc/openspecimen”
    • Add the below lines at the end of tag
      validationInterval=“3600”
      testOnBorrow=“true”
      validationQuery=“Select 1 from dual”

    So after updating the Resource tag will looks like below:

    <Resource name="jdbc/openspecimen" auth="Container" type="javax.sql.DataSource"
         maxActive="100" maxIdle="30" maxWait="10000"
         username="root" password="root" driverClassName="com.mysql.jdbc.Driver"
         url="jdbc:mysql://localhost:3307/db
         validationInterval="3600"
         testOnBorrow="true"
         validationQuery="Select 1 from dual"
       />
    

    ~Nitesh