Login from web and app take too much time

Login from web and app take too much time

by Mayank Tyagi -
Number of replies: 9

Hi all,

My live site takes too much time (more then 3 minute) for logging. After logging site works properly. The same case is for mobile login. When I hit the token.php with proper parameters it also take more then three for share the result. Other webservices share the result with in the time. I am using moodle 3.2


Average of ratings: -
In reply to Mayank Tyagi

Re: Login from web and app take too much time

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Moving to Hardware and performance forum...
In reply to Mayank Tyagi

Re: Login from web and app take too much time

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You are going to have to give us a LOT more information about your system to have a hope of a reply.

The first thing is, how are you authenticating users (is it some external system)?

You might also consider that Moodle 3.2 has been completely unsupported for approaching two years! I would strongly encourage you to upgrade.
In reply to Howard Miller

Re: Login from web and app take too much time

by Mayank Tyagi -
We are using simple manual authentication. Even "authenticate_user_login($frm->username, $frm->password, false, $errorcode);" returns user object properly.
I will discuss about upgrading of the site with team. But for now I need to focus on this issue.
In reply to Mayank Tyagi

Re: Login from web and app take too much time

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You don't utilize any https://docs.moodle.org/en/Authentication, only https://docs.moodle.org/en/Manual_accounts ?

You have Moodle 3.2, that means you haven't done anything, like Moodle upgrades, system upgrades for some time? When did the problem start? I mean the calendar date and any changes that have been done around this time.
In reply to Mayank Tyagi

Re: Login from web and app take too much time

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
"I will discuss about upgrading of the site with team. But for now I need to focus on this issue"

You may want to consider that there have been fixes and improvements in the authentication code in those years. Might help / might not.
Average of ratings: Useful (1)
In reply to Mayank Tyagi

Re: Login from web and app take too much time

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I assume by 'properly' you mean quickly?

Is this one user or every user? How big is your site? How big is your log file? How are sessions configured? How is caching configured?
Average of ratings: Useful (1)
In reply to Howard Miller

Re: Login from web and app take too much time

by Mayank Tyagi -
The site is working properly now. The problem was in the authentication we are using to authenticate user. Some third party api was not working. Thanks for your quick help and response.

This was for every user. The site have more then 30K users.
In reply to Mayank Tyagi

Re: Login from web and app take too much time

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
"We are using simple manual authentication"

so, no you weren't wink
Average of ratings: Useful (1)
In reply to Howard Miller

Re: Login from web and app take too much time

by Mayank Tyagi -
Hahaha, we just using api to validate user profile data, once data is match user is authenticated in moodle via manual authentication only.