{"action":"created","issue":{"url":"https://api.github.com/repos/frappe/erpnext/issues/8934","repository_url":"https://api.github.com/repos/frappe/erpnext","labels_url":"https://api.github.com/repos/frappe/erpnext/issues/8934/labels{/name}","comments_url":"https://api.github.com/repos/frappe/erpnext/issues/8934/comments","events_url":"https://api.github.com/repos/frappe/erpnext/issues/8934/events","html_url":"https://github.com/frappe/erpnext/issues/8934","id":229943451,"number":8934,"title":"When the emails are deleted, frappe.model.delete_doc.delete_dynamic_links causes 100% CPU load","user":{"login":"joolsr","id":934876,"avatar_url":"https://avatars2.githubusercontent.com/u/934876?v=3","gravatar_id":"","url":"https://api.github.com/users/joolsr","html_url":"https://github.com/joolsr","followers_url":"https://api.github.com/users/joolsr/followers","following_url":"https://api.github.com/users/joolsr/following{/other_user}","gists_url":"https://api.github.com/users/joolsr/gists{/gist_id}","starred_url":"https://api.github.com/users/joolsr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joolsr/subscriptions","organizations_url":"https://api.github.com/users/joolsr/orgs","repos_url":"https://api.github.com/users/joolsr/repos","events_url":"https://api.github.com/users/joolsr/events{/privacy}","received_events_url":"https://api.github.com/users/joolsr/received_events","type":"User","site_admin":false},"labels":[{"id":42304942,"url":"https://api.github.com/repos/frappe/erpnext/labels/bug","name":"bug","color":"e11d21","default":true},{"id":603536340,"url":"https://api.github.com/repos/frappe/erpnext/labels/email","name":"email","color":"d93f0b","default":false},{"id":595358798,"url":"https://api.github.com/repos/frappe/erpnext/labels/framework","name":"framework","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-05-19T11:08:35Z","updated_at":"2017-05-27T20:41:58Z","closed_at":null,"body":"**Problem**\r\n\r\nUsing ERPNext: v8.0.29 (master)\r\nFrappe Framework: v8.0.47 (master)\r\n\r\nSince the commit below\r\n\r\nhttps://github.com/frappe/frappe/commit/ebbcd4593e3cb7fac06f2b3ad9c05fc3f4cf88dc\r\n\r\nemails in the email inbox view when deleted (not moved to trash) , calls **frappe.model.delete_doc.delete_dynamic_links** which runs for approx 30s per deleted email and causes 100 % CPU load.\r\n\r\nMy server is not under specced. For 5 users (just in test situation only as yet), it is a dual core, SSD with 4GB RAM installed with Ubuntu 16.04 LTS with the easy-install script as a vanilla install.\r\n\r\nIt appears that the background task when it calls the process to delete dynamic links is at fault somewhere which was refactored with the commit above. Before this commit emails when deleted, and there was no slowing of the box that was noticeable.\r\n\r\nThis a forum post I made that gives a bit more background.\r\nhttps://discuss.erpnext.com/t/getting-100-cpu-when-emails-and-communications-are-deleted/23956\r\n\r\nIf you delete 10 emails, then it does take ten times longer to for the high cpu activity to cease. ie for ten emails about 3-4 minutes on average. \r\n\r\nI'm not a programmer but happy to help provide info to help with the debug \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/frappe/erpnext/issues/comments/304475480","html_url":"https://github.com/frappe/erpnext/issues/8934#issuecomment-304475480","issue_url":"https://api.github.com/repos/frappe/erpnext/issues/8934","id":304475480,"user":{"login":"tundebabzy","id":818803,"avatar_url":"https://avatars1.githubusercontent.com/u/818803?v=3","gravatar_id":"","url":"https://api.github.com/users/tundebabzy","html_url":"https://github.com/tundebabzy","followers_url":"https://api.github.com/users/tundebabzy/followers","following_url":"https://api.github.com/users/tundebabzy/following{/other_user}","gists_url":"https://api.github.com/users/tundebabzy/gists{/gist_id}","starred_url":"https://api.github.com/users/tundebabzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tundebabzy/subscriptions","organizations_url":"https://api.github.com/users/tundebabzy/orgs","repos_url":"https://api.github.com/users/tundebabzy/repos","events_url":"https://api.github.com/users/tundebabzy/events{/privacy}","received_events_url":"https://api.github.com/users/tundebabzy/received_events","type":"User","site_admin":false},"created_at":"2017-05-27T20:41:58Z","updated_at":"2017-05-27T20:41:58Z","body":"@joolsr \r\nCan you assist us by installing a GUI to monitor the database like dbForge or MySQL Workbench?"}}
{"actor":{"display_login":"tundebabzy"}}