Slow First Response

4 posts, 0 answers
  1. Ted
    Ted avatar
    47 posts
    Member since:
    Jan 2008

    Posted 18 Oct 2011 Link to this post

    I am using Open Access ORM for a website and it works great.  however, if the website sits idle with no connections for a period of time (say overnight) the first access the next day takes a long time.  after that initial access it works fast.  my guess is that it's a connection issue and after so long all the connections are dropped so the next day the first access is Very Slow.

    My question: is there a way to keep a connection open to eliminate this first access slow response?

    Thanks
  2. Ted
    Ted avatar
    47 posts
    Member since:
    Jan 2008

    Posted 18 Oct 2011 Link to this post

    if it helps this is our current Backend Configurations

     

    <BackendConfigurationSettings>
          <BackendConfiguration>
            <Backend>mssql</Backend>
            <Runtime>
              <NullOnRowNotFound>True</NullOnRowNotFound>
            </Runtime>
            <ConnectionPool>
              <MaxActiveConnections>20</MaxActiveConnections>
              <MaxIdleConnections>20</MaxIdleConnections>
              <MinIdleConnections>3</MinIdleConnections>
              <MaxPreparedStatements>15</MaxPreparedStatements>
            </ConnectionPool>
          </BackendConfiguration>
        </BackendConfigurationSettings>
  3. DevCraft banner
  4. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 19 Oct 2011 Link to this post

    Hello Ted,
    The problem comes from the creation of the first context. Here we have to calculate all our metadata, prepare all OpenAccess structures and open the database connections. Probably you are checking the database schema as well. This does not happen if the process is idle but if the IIS has recycled the page.

    Maybe you want to have a look here.

    All the best,
    Jan Blessenohl
    the Telerik team

    Check out the latest stable build of Telerik OpenAccess ORM. Download it and benefit from our new Project Templates.

  5. Ted
    Ted avatar
    47 posts
    Member since:
    Jan 2008

    Posted 19 Oct 2011 Link to this post

    Thanks Jan,  that makes sense.  I was not aware of this new feature in 4.0.  right now we are running 3.5 still.  we are testing a new server and will move to 4.0 soon so this information will be very helpful then.
Back to Top