Disable Automatic log-out

I need to disable automatic expiration of sessions on my Nextcloud installation, as it hinders me as well as others to upload bigger files. It gets canceled and interrupted becuase of the automatic log out. I have read something about keep_session_alive and have configured it for 24h, but I still get logged out and random. It doesn’t seem to be a pattern. sometimes i stay logged in for hours, sometimes 30 min at most.

Can I completely disable this somehow? Thx

1 Like

Bump. Someone got a fix for this?

1 Like

Check-out the documentation, especially the remember_login_cookie_lifetime, session_lifetime and session_keepalive parameters.

I’ve done so. I noticed now I wrote => ‘true’, . I changed it to => true,

Do you believe this has significance?

EDIT: That didn’t do it. I’ve posted a Printscreen of the related settings in my config.php. Can you see any obvious errors?


I’ve personally never experienced the problem you described. Maybe it is related to some kind of automatic cookie deletion in your web browser?! BTW, you asked how you could disable functions, some of them by setting its value to “0”.

Setting the values to 0 prevented me from logging it at all, but the kinda confirms that the settings are read. Even though I set it to 24 hours, it does never last that long.

Running nginx or apache? how was the server setup ? What connection are you using to upload file with? What do you mean with large files? 500Mb 1gb several gb?

What php version is also interesting to know. I dont have this problem on any of my own instances.

Running apache. Server was not setup through the package install, I installed all necessary components seperately. Huge files, that might not be able to upload in time. I am not personally experiencing issue with uploading, but my colleagues are.

I’m running php 7.1

I just tested a 5gb file on one of my own production instances. Took on my link around 45 minutes. And i haven’t tweaked nextcloud session times on it.

For me it sound like session control breaks somehow. Default session time for php is 1440 seconds.

Maybe I should look in some other configuration files then?

That or someone does not have a stable connection to the network. I just tried an 800Mb file on my test system. Where i logged in yesterday the last time and could start and finalize the upload with no problem.

You can use “RaiDrive” to upload.

I’ve experienced this as well - some of what I read suggested looking at cron jobs and cleaning of session data

I made some changes to the cron job background job. Wonder if it actually causes the problem.

EDIT: I dare say this actually fixed it for me. Extended the cronjob that runs cron.php to 24 hours, instead of 1 hour.

Is there any downsides to this change?

1 Like