0

Hy everybody,

i need Help for the following Problem:

I have a Single-Page-Application (REACT, Webpack) with .NET Core 3.1, Devart for Oracle 9.11.980.

The first call to the Database is very slow (20 Seconds). I tested different Calls from my Single-Page-Application.

  1. Call a Rest-API with an connection to a Database. The Response is a JSON-Object. In the DB-Table is only one record. (Duration: 22 Seconds)
  2. Call a Rest-API without connection to a Database which is generating the same JSON-Response like the Call in Number 1 (Duration: Milliseconds)
  3. Call a Rest-API without connection to a Database. The Response is a string (Duration: Milliseconds).

So it seems to be the connection to the Database.

When i restart the App (e.g. F5) the Call of the Rest-API from Number 1 only needs Milliseconds.

When i Stop and Start the AppPool on IIS for that Application, the Rest-API from Number 1 needs again 22 Seconds for the first request.

It is just a simple Call to the Database:

             using (Data.ma06kesch_adminModel context = new Data.ma06kesch_adminModel())
            {

                IQueryable<BANKOMATKARTE> query = context.BANKOMATKARTE.ToList();

            }

Does anyone have a suggestion? I am not very familiar with IIS. Maybe is it something there? I tried a few different settings but nothing was successful :-/.

Thank you very much.

Roman
  • 11
  • 3

1 Answers1

0

Try setting "Min Pool Size=0;" in your connection string. If this doesn't help, refer to Fixing slow initial load for IIS.

In the case of large and complex EF6 model, also look at https://www.fusonic.net/developers/2014/07/09/3-steps-for-fast-entity-framework-6-1-code-first-startup-performance/.

Devart
  • 119,203
  • 23
  • 166
  • 186