Users getting logged out after 10 minutes

I have a an app that I’m migrating from MySQL to Azure.

In MySQL everything worked perfectly, but for some reason in Azure my users seem to get logged out after 10 minutes. I’m not sure where to start digging to identify the source of the issue.

My Login action is

public function actionLogin()
{
    if (!Yii::$app->user->isGuest) {
        // return $this->goHome();
        return $this->redirect(['projects/index']);
    }

    $model = new LoginForm();
    if ($model->load(Yii::$app->request->post()) && $model->login()) {
        return $this->redirect(['projects/index']);
    } else {
        $model->password = '';

        return $this->render('login', [
            'model' => $model,
        ]);
    }
}

from the model

public function login()
{
    if ($this->validate()) {
        return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600 * 24 * 30 : 0);
    }
    
    return false;
}

Can anyone help me isolate and remedy the issue?

Thank you

What’s special about Azure’s MySQL?

I was previous using a MySQL back-end and now am switching to Azure SQL. In the process, I also took the time to upgraded Yii from 2.0.14 to 2.0.38. Suddenly now my users are being kicked out (what seems to be after a 10 minute window) and I can’t figure out why.

Alright. So there are two changes:

  1. Azure.
  2. Yii upgrade.

It worth testing these separately.

I played around with my main config and it seems to be working again.