Ben94
4 weeks ago
1130
1
Servers

Maximum execution time of 300 seconds exceeded

Posted 4 weeks ago by Ben94

I am trying to upload a working Laravel site onto IIS. I believe everything is working correctly as I can see the landing page. But when I try to log in, the request keeps hanging until I get the error 'Maximum execution time of 300 seconds exceeded'.

The Laravel debugger shows the following block of code.

        try {
            return $this->createPdoConnection(
                $dsn, $username, $password, $options <------ This line is red
            );
        } catch (Exception $e) {
            return $this->tryAgainIfCausedByLostConnection(
                $e, $dsn, $username, $password, $options
            );
        }

So I presumed it was a problem with the Database connection, but when I connect to the database (for example by doing a User::All() on the landing page, it works perfectly. Even in artisan tinker the connection is established.

I have narrowed the place where the error establishes down, in the Laravel auth login.

    protected function attemptLogin(Request $request)
    {
        return $this->guard()->attempt(
            $this->credentials($request), $request->filled('remember')
        );
    }

I have no clue what's causing this, but I'm afraid it's an IIS error, although this seems unlikely given that the rest works.

Please sign in or create an account to participate in this conversation.