server icon indicating copy to clipboard operation
server copied to clipboard

Slow log out.

Open wjwieland opened this issue 8 years ago • 88 comments

Steps to reproduce

  1. Log into nextcloud
  2. Log out 3.

Expected behaviour

Log out should be as fast as log in. There should not be a delay to get out of the system.

Actual behaviour

I have two instances of Nextcloud (one mine, one is a friends). Both are V 13.1. Either may take anywhere from 5 to 30 seconds to achieve log out.

Server configuration

Operating system: Ubuntu

Web server: Apache2 Database: MySQL PHP version: 7.2 Nextcloud version: (see Nextcloud admin page) 13.1 Updated from an older Nextcloud/ownCloud or fresh install: One of each Where did you install Nextcloud from: Web Signing status:

Signing status
Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.
No errors have been found.
</details>

**List of activated apps:**
<details>
<summary>App list</summary>

If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your Nextcloud installation folder Enabled:

  • activity: 2.6.1
  • apporder: 0.4.1
  • bruteforcesettings: 1.0.3
  • calendar: 1.6.1
  • comments: 1.3.0
  • contacts: 2.1.3
  • dashboard: 4.0.6
  • dav: 1.4.6
  • federatedfilesharing: 1.3.1
  • federation: 1.3.0
  • files: 1.8.0
  • files_pdfviewer: 1.2.1
  • files_sharing: 1.5.0
  • files_texteditor: 2.5.1
  • files_trashbin: 1.3.0
  • files_versions: 1.6.0
  • files_videoplayer: 1.2.0
  • firstrunwizard: 2.2.1
  • gallery: 18.0.0
  • logreader: 2.0.0
  • lookup_server_connector: 1.1.0
  • nextcloud_announcements: 1.2.0
  • notifications: 2.1.2
  • oauth2: 1.1.0
  • passman: 2.1.4
  • password_policy: 1.3.0
  • provisioning_api: 1.3.0
  • serverinfo: 1.3.0
  • sharebymail: 1.3.0
  • survey_client: 1.1.0
  • systemtags: 1.3.0
  • tasks: 0.9.6
  • theming: 1.4.1
  • twofactor_backupcodes: 1.2.3
  • updatenotification: 1.3.0
  • weather: 1.5.1
  • workflowengine: 1.3.0

Nextcloud configuration:

Config report
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or 

Insert your config.php content here. 
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "bobbi1.is-an-artist.net",
            "192.168.0.16",
            "192.168.50.176"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "http:\/\/bobbi1.is-an-artist.net\/nextcloud",
        "dbtype": "mysql",
        "version": "13.0.1.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "defaultapp": "calendar,files,dashboard",
        "maintenance": false,
        "theme": "",
        "loglevel": 2
    }
}

</details>

**Are you using external storage, if yes which one:** local/smb/sftp/...
No
**Are you using encryption:** yes/no
No
**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...
No
#### LDAP configuration (delete this part if not used)
<details>
<summary>LDAP config</summary>

With access to your command line run e.g.: sudo -u www-data php occ ldap:show-config from within your Nextcloud installation folder

Without access to your command line download the data/owncloud.db to your local computer or access your SQL server remotely and run the select query: SELECT * FROM oc_appconfig WHERE appid = 'user_ldap';

Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

</details>

### Client configuration
**Browser:**
chromium, Google Chrome
**Operating system:**
Ubuntu
### Logs
#### Web server error log
<details>
<summary>Web server error log</summary>

N/A
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Nextcloud log {"reqId":"JTdr8OQ7ACQEgPi71sJ0","level":3,"time":"2018-04-13T17:23:54+00:00","remoteAddr":"71.48.121.114","user":"wjw","app":"PHP","method":"GET","url":"\/nextcloud\/index.php\/settings\/admin","message":"Cannot modify header information - headers already sent by (output started at \/var\/www\/nextcloud\/apps\/passman\/personal.php:1) at \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Output.php#69","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/65.0.3325.181 Safari\/537.36","version":"13.0.1.1"}

Insert your Nextcloud log here

Browser log

Browser log

N/A Insert your browser log here, this could for example include:

a) The javascript console log b) The network log c) ... JQMIGRATE: Migrate is installed, version 1.4.0 12:32:08.990 DevTools failed to parse SourceMap: https://bobbi1.is-an-artist.net/nextcloud/core/vendor/purify.min.js.map 12:32:09.381 inject.js:324 Found 1 logins for this site 12:32:09.443 inject.js:324 Found 1 logins for this site

wjwieland avatar Apr 13 '18 17:04 wjwieland

I'm also observing this in NextCloud 13.0.7. Any hints what might be causing this?

gohrner avatar Nov 15 '18 11:11 gohrner

@gohrner Oddly enough, after I 'click' on logour the second time, it immediately logs out and goes back to the login page. If I don't click the second time, it will grind away for up to ~30 seconds before finally logging out....odd....and bothersome.

wjwieland avatar Nov 18 '18 01:11 wjwieland

I have a similar problem on nextcloud 14.0.3, and actually a even worse issue. When is trying to logout all the sessions under the same domain are closed even the sessions under shibboleth. Is this related on having authentication with ldap?

linuxkafe avatar Nov 22 '18 15:11 linuxkafe

I upgraded to NextCloud 14.03, same issue. Will check into the log-rotate setting above mentioned by @nextcloud-bot. The second click behavior mentioned still persists as well. Same applies to Nextcloud 14.04. This is after following steps in https://docs.nextcloud.com/server/14/admin_manual/issues/general_troubleshooting.html#service-discovery.

wjwieland avatar Nov 22 '18 17:11 wjwieland

In 14.04 this issue was solved to me :)

linuxkafe avatar Nov 22 '18 17:11 linuxkafe

For me the logout takes 15s (owncloud takes < 1s). My system: Ubuntu 16.04.5 LTS

PHP 7.0.32-0ubuntu0.16.04.1 (cli) ( NTS )
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.32-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies
'filelocking.enabled' => true,
'memcache.local' => '\\OC\\Memcache\\Redis',
'redis' => 
array (
  'host' => '/var/run/redis/redis.sock',
  'port' => 0,
),
'memcache.locking' => '\\OC\\Memcache\\Redis',

adrhc avatar Jan 20 '19 18:01 adrhc

Logout takes really long some times (latest stable 15.x). In chromium, if I do 'empty cache and hard reload', logouts becomes fast again.

pgera avatar Feb 15 '19 07:02 pgera

Same issue and no solution found :-( Ubuntu 18.04.1 Apache 2.4.29 PHP 7.2.15 MySQL 5.7.25

agarek avatar Mar 06 '19 16:03 agarek

Same issue in 15. I saw it in 14 too. Clicking the logout again after a few seconds wakes it up for me.

deddc23efb avatar Apr 05 '19 03:04 deddc23efb

Please open again, the problem persists.

Nexcloud 15.0.6

Steps to reproduce:

  • sign in, then sign out

Results (sign out duration, deterministic / reproducible):

  • Chrome 73.0.3683.86 - 9.89 s
  • Safari 12.1.1 (14607.2.2) - 701 ms

alexanderheckel avatar Apr 06 '19 11:04 alexanderheckel

Can you reproduce this with https://demo.nextcloud.com?

kesselb avatar Apr 06 '19 12:04 kesselb

Thanks for your quick response.

Yes, I can reproduce the behaviour with the demo instance -- 9.92 s with Chrome and 368 ms with Safari.

Here the header details of Chrome's logout request, if you have the change to see something in the logs of the demo instance:

Request URL: https://demo.nextcloud.com/aeb9ouc9/logout?requesttoken=WRHtv%2BSN6UKbAyDm9VByvhAlsnZbkcgvCvgPw1d4l24%3D%3AFSOc67PVpBvDO2eLkB8l%2BlZMggQc3bpaPIhrpiIS8lg%3D Request Method: GET Status Code: 303 See Other Remote Address: 91.103.114.57:443 Referrer Policy: no-referrer Cache-Control: no-cache, no-store, must-revalidate Clear-Site-Data: "cache", "storage", "executionContexts" Connection: Keep-Alive Content-Length: 0 Content-Security-Policy: default-src 'none';base-uri 'none';manifest-src 'self';script-src 'nonce-ckFDN0xEbFd3bGlpMytnZ3l5QUtzZWpjWkVZRTZ3eEFKUDdZb1FvZlZDbz06NERMS2VHNE9qd0g2NTY5TnJtOWQ5YTYxVkRSRHAzNDFFbzY4eEg5MU1Sdz0=';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self' data:;connect-src 'self' stun.nextcloud.com:443;media-src 'self';frame-src https://demo.nextcloud.com Content-Type: text/html; charset=UTF-8 Date: Sat, 06 Apr 2019 12:08:07 GMT Expires: Thu, 19 Nov 1981 08:52:00 GMT Keep-Alive: timeout=5, max=100 Location: https://demo.nextcloud.com/aeb9ouc9/login Pragma: no-cache Referrer-Policy: no-referrer Server: Apache Set-Cookie: nc_username=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/aeb9ouc9; secure; HttpOnly Set-Cookie: nc_token=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/aeb9ouc9; secure; HttpOnly Set-Cookie: nc_session_id=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/aeb9ouc9; secure; HttpOnly Set-Cookie: nc_username=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/aeb9ouc9/; secure; HttpOnly Set-Cookie: nc_token=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/aeb9ouc9/; secure; HttpOnly Set-Cookie: nc_session_id=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/aeb9ouc9/; secure; HttpOnly Set-Cookie: ocy3i56r5v7j=fcv2pt18f7g3eujgkdilf428kg; path=/aeb9ouc9; secure; HttpOnly Strict-Transport-Security: max-age=15768000 X-Content-Type-Options: nosniff X-Download-Options: noopen X-Frame-Options: SAMEORIGIN X-Permitted-Cross-Domain-Policies: none X-Robots-Tag: none X-XSS-Protection: 1; mode=block Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3 Accept-Encoding: gzip, deflate, br Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7 Connection: keep-alive Cookie: oc_sessionPassphrase=La7jsToQu5QdWUSXWBNdhCs3LiYHgzO9V46eL9riUdywKwWpoZzdyjnbeVPiyutZl2KlVu8LndhbsGt4RMMVQ4LF%2FRzpRMv4M6Dcy6W28CXmVUR15mMn24kFRtQrUv%2BO; nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=true; ocy3i56r5v7j=nmsm2s1npcdo65u8g6e58t22a2; nc_username=admin; nc_token=pCopR%2BQVogmDxBFRY65Byf%2F%2FK0OS%2F0Qq; nc_session_id=nmsm2s1npcdo65u8g6e58t22a2; _pk_ref.1.7a80=%5B%22%22%2C%22%22%2C1554487329%2C%22https%3A%2F%2Fwww.google.com%2F%22%5D; _pk_id.1.7a80=1a7153c162da0beb.1542219749.16.1554487336.1554487329. Host: demo.nextcloud.com Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36 requesttoken: WRHtv+SN6UKbAyDm9VByvhAlsnZbkcgvCvgPw1d4l24=:FSOc67PVpBvDO2eLkB8l+lZMggQc3bpaPIhrpiIS8lg=

alexanderheckel avatar Apr 06 '19 12:04 alexanderheckel

The issue definitely isn't fixed, I observe it on both of my NextCloud instances, one using LDAP and the other not using LDAP. The problem persists since 13, is still present in 15.0.5 and simply hasn't been dealt with so far...

gohrner avatar Apr 06 '19 18:04 gohrner

Not sure why but logout with chrome is (much) slower than firefox.

kesselb avatar Apr 06 '19 18:04 kesselb

To anyone experimenting with chrome, can you try 'empty cache and hard reload' and check if it makes logout faster ? It reliably does for me. Press F12 and right click on the refresh button to the left of home.

pgera avatar Apr 07 '19 00:04 pgera

I can confirm that clearing the cache (completely, every option and whole history) makes logout faster - thanks. If this is necessary once to solve the problem, it's acceptable -- let's see for how long.

alexanderheckel avatar Apr 07 '19 07:04 alexanderheckel

In my experience, the slowdowns happen again eventually. This is only a temporary fix.

pgera avatar Apr 07 '19 07:04 pgera

NC 15.0.6 on Chromium or Firefox PHP7.0 Raspbian Stretch

I observe the slow logout as well, but only when I'm in the same network as the nextcloud-raspberry-pi. If I logout from "extern" the logout is much faster.

efelon avatar Apr 07 '19 20:04 efelon

I have this problem as well. It usually takes up to 30 seconds for the logout to finish. If I press the logout button again after 2-3 seconds, the logout happens instantly.

I am using the latest version of Chrome. I can confirm that a complete cache clears fixes the problem for a while, but it sure does come back.

Falken82 avatar May 03 '19 09:05 Falken82

same issue here...

tynie avatar May 08 '19 17:05 tynie