{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/5383","labels_url":"https://api.github.com/repos/owncloud/core/issues/5383/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/5383/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/5383/events","html_url":"https://github.com/owncloud/core/issues/5383","id":21144469,"number":5383,"title":"Faulty session handling (creating massive amount of sessions when webdav-interface is in use) - workaround","user":{"login":"Cymaphore","id":5708483,"avatar_url":"https://avatars.githubusercontent.com/u/5708483?v=3","gravatar_id":"","url":"https://api.github.com/users/Cymaphore","html_url":"https://github.com/Cymaphore","followers_url":"https://api.github.com/users/Cymaphore/followers","following_url":"https://api.github.com/users/Cymaphore/following{/other_user}","gists_url":"https://api.github.com/users/Cymaphore/gists{/gist_id}","starred_url":"https://api.github.com/users/Cymaphore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cymaphore/subscriptions","organizations_url":"https://api.github.com/users/Cymaphore/orgs","repos_url":"https://api.github.com/users/Cymaphore/repos","events_url":"https://api.github.com/users/Cymaphore/events{/privacy}","received_events_url":"https://api.github.com/users/Cymaphore/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/blue-ticket","name":"blue-ticket","color":"0033CC"},{"url":"https://api.github.com/repos/owncloud/core/labels/enhancement","name":"enhancement","color":"02e10c"},{"url":"https://api.github.com/repos/owncloud/core/labels/enhancement%20-%20proposed","name":"enhancement - proposed","color":"FF9900"},{"url":"https://api.github.com/repos/owncloud/core/labels/in%20progress","name":"in progress","color":"ededed"},{"url":"https://api.github.com/repos/owncloud/core/labels/technical%20debt","name":"technical debt","color":"FFFF00"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/48","html_url":"https://github.com/owncloud/core/milestones/9.0-current","labels_url":"https://api.github.com/repos/owncloud/core/milestones/48/labels","id":1196845,"number":48,"title":"9.0-current","description":"","creator":{"login":"cmonteroluque","id":879976,"avatar_url":"https://avatars.githubusercontent.com/u/879976?v=3","gravatar_id":"","url":"https://api.github.com/users/cmonteroluque","html_url":"https://github.com/cmonteroluque","followers_url":"https://api.github.com/users/cmonteroluque/followers","following_url":"https://api.github.com/users/cmonteroluque/following{/other_user}","gists_url":"https://api.github.com/users/cmonteroluque/gists{/gist_id}","starred_url":"https://api.github.com/users/cmonteroluque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmonteroluque/subscriptions","organizations_url":"https://api.github.com/users/cmonteroluque/orgs","repos_url":"https://api.github.com/users/cmonteroluque/repos","events_url":"https://api.github.com/users/cmonteroluque/events{/privacy}","received_events_url":"https://api.github.com/users/cmonteroluque/received_events","type":"User","site_admin":false},"open_issues":646,"closed_issues":1026,"state":"open","created_at":"2015-07-07T14:21:23Z","updated_at":"2016-01-19T14:21:17Z","due_on":"2016-03-08T04:00:00Z","closed_at":null},"comments":47,"created_at":"2013-10-17T10:33:02Z","updated_at":"2016-01-19T14:58:05Z","closed_at":null,"body":"ownCloud 5.0.11\r\nlighttpd/1.4.28 (via reverse proxy)\r\nLinux 3.8.0-31-generic #46~precise1-Ubuntu SMP Wed Sep 11 18:21:16 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux\r\n\r\nMany (most?) WebDAV-Clients don't support cookie-handling very well, since session credentials are handled using HTTP Authentication. ownCloud however enforces the creation of sessions, even if they are not needed.\r\n\r\nThis causes the creation of a MASSIVE amount of useless session files when using caldav, carddav, etc. ... In my personal instance approx. 20000 files are created per week. That means a serious performance impact.\r\n\r\nI created a workaround as well as a suggestion to resolve this issue permanently, if you provide me with proper feedback.\r\n\r\nWorkaround - Remove session after remote.php-query is done:\r\n\r\n--- remote.php     2013-10-17 12:12:35.797631235 +0200\r\n+++ remote.php  2013-10-17 12:12:40.365631235 +0200\r\n@@ -38,3 +38,6 @@\r\n }\r\n $baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';\r\n require_once $file;\r\n+\r\n+session_unset();\r\n+session_destroy();\r\n\r\nThis is a safe way to resolve the issue, however:\r\n\r\nThere is a performance gain possible but not creating the session when involving remote.php at all. Is there already a way to suppress session-creation? If not, it could be supressed using a variable like $RUNTIME_NOAPPS (for example set $RUNTIME_NOSESSION = true; at the top of remote.php, in base.php don't create session when it is set).\r\n\r\nIf you like that solution I could implement it. However, I highly recommend to do something about it.\r\n\r\nBest regards,\r\nMartin\r\n"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/172877897","html_url":"https://github.com/owncloud/core/issues/5383#issuecomment-172877897","issue_url":"https://api.github.com/repos/owncloud/core/issues/5383","id":172877897,"user":{"login":"LukasReschke","id":878997,"avatar_url":"https://avatars.githubusercontent.com/u/878997?v=3","gravatar_id":"","url":"https://api.github.com/users/LukasReschke","html_url":"https://github.com/LukasReschke","followers_url":"https://api.github.com/users/LukasReschke/followers","following_url":"https://api.github.com/users/LukasReschke/following{/other_user}","gists_url":"https://api.github.com/users/LukasReschke/gists{/gist_id}","starred_url":"https://api.github.com/users/LukasReschke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukasReschke/subscriptions","organizations_url":"https://api.github.com/users/LukasReschke/orgs","repos_url":"https://api.github.com/users/LukasReschke/repos","events_url":"https://api.github.com/users/LukasReschke/events{/privacy}","received_events_url":"https://api.github.com/users/LukasReschke/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T14:58:05Z","updated_at":"2016-01-19T14:58:05Z","body":"> Did we recently measure the overhead of requests using sessions vs. requests using basic auth?\r\n\r\nDB users are around 70ms per request. (BCrypt etc)\r\n\r\nWill probably also have quite some impact on LDAP setups? cc @blizzz"}}