Login fails "You took too long to login, please try again now"

I had this problem when the certificate did not exactly match the hostname in the address bar. Try to add the hostname to your local hosts file.

Some browsers (e.g. Chrome) recently changed their behavior regarding subdomains. This could lead to the error message too.

Hi,
The issue comes when you don’t have space in your server to storing the data and to logged in your account.
Check your Hard Drive space in server.

1 Like

Great! Thanks!!! Finally I am in!

In my case, it was only happening in HTTP (HTTPS was ok), but I was needing HTTP for local use (without my domain https name). My config.php was like this:
‘trusted_domains’ =>
array (
0 => ‘192.168.1.170:8000’,
1 => ‘192.168.1.170:8443’,
2 => ‘mydomain.com:443

And I solved it by removing repeated domain (with different port):
‘trusted_domains’ =>
array (
0 => ‘192.168.1.170’,
1 => ‘mydomain.com

In fact, it seems that putting more than one domain with different port causes unexpected troubles, so it’s better to authorize the full domain without ports.

2 Likes

Hey,

thanks for posting this additional information / workaround.

The configuration setting is called “trusted_domains” and to my knowledge a port isn’t part of a domain so it might be expected that you don’t need to add a port there.

Adding in a small note, this could also happen if you’re out of disk space

Hi there,

|version|10.2.1.4|
|versionstring|10.2.1|

I received this ‘error’ today after having upgraded OC yesterday to latest version. I am running on VPS with Apache 2.4.x and php 7.2. In my case it was the cookie setting in Apache(!) which was causing this behaviour. My OC install is accessed using HTTP and I had just edited my Apache global config to always set secure cookies. And boom I couldn’t log into my OC with this message of taking too long. When I removed the ‘secure’ option in my Apache cookie setting it worked again.

Something for devs to have a look at :slight_smile:

Hope it helps others!

Regards,
Eric

1 Like

Hey,

nice that you have found this mis-configuration in your webserver.

From what i know the “secure” cookie disallows the transmission of this cookie over insecure HTTP connections. I’m not sure if a developer of ownCloud can do much about this. :slightly_frowning_face:

But maybe you could still notify them at https://github.com/owncloud/core/issues to see what they think about this?

For what it’s worth for future reference, my situation:

Intention: Upgrade from PHP 7.0 to PHP 7.2 with no other changes (no owncloud upgrades at the same time, to help ensure that any faults are isolated only to the PHP update)

Issue: After finally finding all the required packages (in plain site: https://doc.owncloud.org/server/10.3/admin_manual/installation/manual_installation.html#install-the-required-packages)
I managed to get my login page up, but logging in achieve this error that it took too long.

Solution: My server logs gave me the following gripe: “message”:"Unknown: POST Content-Length of 127 bytes exceeds the limit of 2 bytes at Unknown#0
Which led me to update my php.ini file with huge limits on max_execution_time, max_input_time, memory_limit, post_max_size and one other.
This didn’t work.

I then create a quick php info file

<?php phpinfo(); ?>

and find there’s an owncloud config file that I didn’t know about (didn’t remember): /etc/php.d/owncloud.ini

I update the two values in here to a suitable format (I had GB instead of just G after the numbers, must have been OK in old PHP version) and that fixes my issue. Restart httpd service each change of course.

2 Likes

in my cases i do:
Update php to 7.3
and some config of php multi ini, see image

2 Likes

Probably an old post but, In my case was that there was no space left on server so PHP could not create the session file (sort of the same with the session files broken or read only)

2 Likes