Extreme loading time when opening a page the first time

Extreme loading time when opening a page the first time

  

Hi all,

I have a problem with Initial Load (the first time a page is opened).

It is expected and acceptable that this will take a little longer then normal. However the company I am working now has extreme long loading times. At first I thought this to be caused by the complexity of the software however for a test we created some simple pages that had hardly any content and these were also extremely slow. 

So, to be sure, I created a complete empty module just to see how the system would deal with an empty espace. This emptyModule had a initial loading time of 1 min and 10 secs! 

I have never seen a initial loading time with a OS system this slow. The problem is not caused by AV or disk space problems. 

Does anyone have a suggestion what can cause this?

Regards,

Hans

Hi,

what does chrome-devtools say?

is it mostly TTFB, or some other stuff?

or perhaps some 404's ?


furthermore, when you test it on the server itself, is it still the same (rule out network/routing issues)



Its definitely not network stuff; there is nothing on the line before the page comes up.Just to be sure I will do a test on the server.

Devtools is clean; there are no 404's. It is just an "empty" page (empty as in OutSystems-empty. Which is not empty. But empty enough in this case.)

This occurs with every page, not just this one. This empty page just is an easy test to show the extreme loading time. After the initial loading time the page time goes to 40 msec.

Hans Bruins wrote:

Its definitely not network stuff; there is nothing on the line before the page comes up.Just to be sure I will do a test on the server.

Devtools is clean; there are no 404's. It is just an "empty" page (empty as in OutSystems-empty. Which is not empty. But empty enough in this case.)

This occurs with every page, not just this one. This empty page just is an easy test to show the extreme loading time. After the initial loading time the page time goes to 40 msec.

With ASP.Net applications on IIS, freshly deployed applications need to compile on first load, thus increasing load time. Perhaps IIS is struggling with some resources?


Hanno Coetzee wrote:

Hans Bruins wrote:

Its definitely not network stuff; there is nothing on the line before the page comes up.Just to be sure I will do a test on the server.

Devtools is clean; there are no 404's. It is just an "empty" page (empty as in OutSystems-empty. Which is not empty. But empty enough in this case.)

This occurs with every page, not just this one. This empty page just is an easy test to show the extreme loading time. After the initial loading time the page time goes to 40 msec.

With ASP.Net applications on IIS, freshly deployed applications need to compile on first load, thus increasing load time. Perhaps IIS is struggling with some resources?


Nope, it happens with all espaces and it happens all the time. I understood that they have had this problem for a very long time now. I have never seen this by whatever other OS system or customer.


J. wrote:

is it mostly TTFB, or some other stuff?

I did a test on localhost and had the same results. 

The TTFB is indeed the main contributor (according devtools).


hmm, 

Do the platform and database server meet the minimal requirements?

Is the database Oracle or sqlserver or .. ?

if oracle, is the tnsnames correct, perhaps it goes fubar there?

aka can you test the connections to the database..

number of connections sufficient?

applicationpools correct?

Hi J, 

The used database here is an Oracle (they have also a NULL problem laying around ;) ).
The test page itself is empty, also the used application is empty: no entities except the system tabel, no logic, no dependencies, etc. Just 1 screen that takes >1 minute to (initial) load.

They have had this problem for a long time now, they tried several things with connection- and application pools but I will relay your remarks just to check everything.

J. wrote:

hmm, 

Do the platform and database server meet the minimal requirements?

Is the database Oracle or sqlserver or .. ?

if oracle, is the tnsnames correct, perhaps it goes fubar there?

aka can you test the connections to the database..

number of connections sufficient?

applicationpools correct?

The TNSnames are correct, the connection- and application pools are setup together with OutSystems.

So, I guess the problem lays not there. It is a problem that is very difficult to tackle...


yeah :(

can you rule out the database still? Not saying the tnsnames are bad, but how is the tnsping?

what does tnsping tell ya?

http://www.dba-oracle.com/teas_prae_util23.htm


Solution

We solved it.

With using a profiler on the server we saw that there was some strange behavior around connecting to the LDAP server. After consulting with our Oracle DBA we understood that we used LDAP first and tnsnames as backup and therefor discovered that the data in the OS config tool was "incorrect": under the database and session tabs the used naming method was set to service name. 

The data itself was correct however due to the way Oracle was set up it was not the correct choice. The naming method should be Tnsname. In this way Oracle will see that they should be using LDAP before Tnsnames. Very logical :) Luckily our DBA saw that the previous settings made no sense regarding the Oracle setup.

So, inital load went from 1,5 min to 1.2 sec!! We're happy now and will go on to do some more test how this will affect our total system in a positive way :)

Solution

I am experiencing the same issue. After publishing an espace, the first attempt at navigating to the module will either take 2-3 mins to load, or just time-out. However, a refresh of the page and it eventually loads.

This only happens after a publish. We have hundreds of pages across our apps, and publish updates regularly. There must be a way to minimise this. 


Any ideas?


Can someone from Outsystems assist with this? In an environment where apps are published to production on a regular basis, this initial page load time is frustrating our clients.

Any help would be appreciated.



Hi Robbie,

It might be worth opening a support case. Did this happen overnight? Graduallly?

It might be useful also to publish a new post with your issue, which might be different and this post is already flagged as solved.

Hi Robbie,

What stack are you using, .NET/Java and SQL Server/Oracle?

From my knowledge, I believe the solution is dependent on the architecture of the app. If there's no chance to improve the architecture, I would recommend implementing a mechanism to perform a warm up of your application after a publish.

I agree that we need to implement a mechanism to "warm-up" our applications.


Can anyone suggest the best way to do this?


Thanks.

There is a forge component that my help! 

http://www.outsystems.com/forge/component-details/1140/Warmup/


Hi Robbie,


have you checked my answer on the other topic created by you?


Regarding a warmup method, I've also created a solution based on the screen logs of the servers, so it automatically warms up apps that are being visited from the last weeks. I can try to pack it and publish on the Forge if you believe it's useful.

If this is .NET/IIS, there is an IIS plugin out there for "warm up" (https://www.iis.net/downloads/microsoft/application-initialization). I am sure such a thing exists for Java platforms too.

J.Ja

anyone tried to configure the IIS8.0 aaplication initialization for outsystem applications?