Long Loading Time After Login (TTFB)

Long Loading Time After Login (TTFB)

by Uchendu Nwachukwu -
Number of replies: 5

Hello Moodlers,

My moodle instance takes more than 30s to load the page after login. On all other sites the performance is fine. It's a pretty fresh moodle 3.1 installation and currently in development.

I have noted that there is a really long Time To First Byte (TTFB) of more than 30s...

The performance overview is all as recommended (on green). 

Any suggestions on how I could improve this?

Average of ratings: -
In reply to Uchendu Nwachukwu

Re: Long Loading Time After Login (TTFB)

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Do you have theme designer turned on?  If so, turn it off!

Otherwise, try giving us a lot more info!  Server specs/install process/theme/moodle version/etc...

In reply to Emma Richardson

Re: Long Loading Time After Login (TTFB)

by Uchendu Nwachukwu -

Sorry for the few infos.

The designer mode is turned off.

There is another moodle instance on the same server with much more data that runs flawless.

Both are running on moodle 3.1 with the essential theme.

During the installation there were no problems nor errors. Further I haven't activated automated backups or statistics. 

Sadly I can't remember when it started to take that much time to log in... I can only assume that it went longer during the customisation of the instance since I didn't noticed it first.

If any more information is needed I would be happy to provide it.


In reply to Uchendu Nwachukwu

Re: Long Loading Time After Login (TTFB)

by Paul Verrall -

My best guess is that your are hitting a php execution time limit on some part of the site. Check your php ini for "max_execution_time", If this is 30s seconds that's a good indication you're on the right track.

Either way the next advise is pretty generic, turn on php/moodle debugging and check for output.

Good luck.

In reply to Paul Verrall

Re: Long Loading Time After Login (TTFB)

by Uchendu Nwachukwu -

Hello,

thanks for the hint. The max_execution_time is set on 60s which lead me to the conclusion that it's something else,

I'm receiving the same messages in the debugging mode. Guess there aren't any information why the page loads only long after the login...

Further I have checked the server log where i found this entry: 

[Sat Dec 10 09:38:50.636556 2016] [proxy_fcgi:error] [pid 8667] [client xxx.xxx.xx.xxx:xxxxx AH01071: Got error 'Primary script unknown\n'

The entry is multiple times listed but I have no idea what it means. On this server now only the moodle application is running. I had no luck searching with these message, maybe I use the wrong keywords. Any suggestions?

In reply to Uchendu Nwachukwu

Re: Long Loading Time After Login (TTFB)

by Uchendu Nwachukwu -

Found the solution.

A plugin (in my case Enrol by User Profile Fields) that run an infinite loop after login caused the long loading time. After disabling this plugin the page loaded immediatly after login!

Thank you for the given hints

Average of ratings: Useful (1)