delayed login: how to debug

How would I best go about debugging a delayed login?

What I’m seeing from a user perspective is this:
Every time I enter my login credentials and hit login, the frontend hangs for ages.
If I reload the page 2sec after submitting my credentials however, I immediately see the dashboard.

First check the issue from a browser perspective in the browser’s web console (for example, network tab, or performance tab). See if it’s locked in a javascript loop, or waiting for a network request, and in that case, which one.

When the delay is several seconds long I sometimes just increase log level to DEBUG, and do the action I want to investigate while running a tail in a Linux console:

tail -f suitecrm.log

When the delay comes up I hit “enter” a few times to create a blank space. Then I can scroll back and investigate that part of the log.

thanks!

It doesn’t seem to always happen, but usually when I log in for the first time in a day. I’ll try tomorrow.

I’m logging in for the first time in 2 weeks today and it’s in some kind of loop.

The database is doing nothing.
The server disk I/O is doing nothing.

Browser Network Console shows these two lines popping up indefinitely:
index.php?action=Login&module=Users&login_module=Calendar&login_action=processScreenSize
index.php?module=Calendar&action=processScreenSize

And this line shows up less often but also regularly:
/index.php?module=Alerts&action=get&to_pdf=1

Can’t do the log-analysis you suggested, since I haven’t changed the error-log settings.

Whenever this happens I’ve always been able to simply refresh the page and I see the CRM Dashboard at once.

Any idea what’s going on here?

You’re on 7.8, right? Using SuiteR?

I just browsed the source code for that processScreenSize, it takes me here

modules/Calendar/processScreenSize.php

and here

themes/SuiteR/js/style.js:353:        url: 'index.php?module=Calendar&action=processScreenSize',

It sure looks like code that you can comment out, at least to test if your problem goes away.

It would be nice to understand why those network requests are occurring in a loop…