{"action":"created","issue":{"url":"https://api.github.com/repos/Puharesource/TitleManager/issues/64","labels_url":"https://api.github.com/repos/Puharesource/TitleManager/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/Puharesource/TitleManager/issues/64/comments","events_url":"https://api.github.com/repos/Puharesource/TitleManager/issues/64/events","html_url":"https://github.com/Puharesource/TitleManager/issues/64","id":111170356,"number":64,"title":"High mysql load when using {BALANCE} variable","user":{"login":"EvilOlaf","id":3305006,"avatar_url":"https://avatars.githubusercontent.com/u/3305006?v=3","gravatar_id":"","url":"https://api.github.com/users/EvilOlaf","html_url":"https://github.com/EvilOlaf","followers_url":"https://api.github.com/users/EvilOlaf/followers","following_url":"https://api.github.com/users/EvilOlaf/following{/other_user}","gists_url":"https://api.github.com/users/EvilOlaf/gists{/gist_id}","starred_url":"https://api.github.com/users/EvilOlaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvilOlaf/subscriptions","organizations_url":"https://api.github.com/users/EvilOlaf/orgs","repos_url":"https://api.github.com/users/EvilOlaf/repos","events_url":"https://api.github.com/users/EvilOlaf/events{/privacy}","received_events_url":"https://api.github.com/users/EvilOlaf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-13T12:32:58Z","updated_at":"2015-10-14T15:19:14Z","closed_at":null,"body":"Hey there,\r\n\r\nI recently discovered that using the `{BALANCE}` variable at the player list causes high mysql load.\r\n\r\nUsually my mysqld runs at about 0.3 to 1.0 % CPU load. When adding `{BALANCE}` to the player list the load raises to about 50 to 70 % CPU load. Removing the variable and reloading the config let the load drop immediately.\r\n\r\nAlso noticed that I receive error messages:\r\n`The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.\r\n[09:48:40] [pool-42-thread-1/INFO]: [iConomy] Database Error: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure`\r\n\r\nThis is probably not be caused by TitleManager at all, more an problem with the MySQLd but it would be nice to know anyways how many queries this particular variable causes per second per player.\r\n\r\nSpigot 1.8.8\r\niConomy \"7.0\" (obviously, I know it is outdated, but worked for me for years now ;))\r\nVault 1.5.6\r\nTM1.5.11\r\n\r\n\r\nI also ran a strace at the mysqld process and noticed that with `{BALANCE}` activated there was VERY high activity while there was almost none with  `{BALANCE}` disabled. I could find perfect matches when entering the `/money` command and see the output at strace. At the test I had about 10 players online and it is weird that these players cause so many queries.\r\n\r\nThanks for reading.\r\n\r\nBest regards\r\nOlaf"},"comment":{"url":"https://api.github.com/repos/Puharesource/TitleManager/issues/comments/148081944","html_url":"https://github.com/Puharesource/TitleManager/issues/64#issuecomment-148081944","issue_url":"https://api.github.com/repos/Puharesource/TitleManager/issues/64","id":148081944,"user":{"login":"EvilOlaf","id":3305006,"avatar_url":"https://avatars.githubusercontent.com/u/3305006?v=3","gravatar_id":"","url":"https://api.github.com/users/EvilOlaf","html_url":"https://github.com/EvilOlaf","followers_url":"https://api.github.com/users/EvilOlaf/followers","following_url":"https://api.github.com/users/EvilOlaf/following{/other_user}","gists_url":"https://api.github.com/users/EvilOlaf/gists{/gist_id}","starred_url":"https://api.github.com/users/EvilOlaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvilOlaf/subscriptions","organizations_url":"https://api.github.com/users/EvilOlaf/orgs","repos_url":"https://api.github.com/users/EvilOlaf/repos","events_url":"https://api.github.com/users/EvilOlaf/events{/privacy}","received_events_url":"https://api.github.com/users/EvilOlaf/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T15:19:14Z","updated_at":"2015-10-14T15:19:14Z","body":"Ya I noticed the lack of UUID support at iConomy. Unfortunately first attempts to convert to another economy plugin like CraftConomy failed at the conversion process. The author also did not respond yet.\r\n\r\nBut that's another story ;).\r\n\r\n\r\nIf you plan to add some kind a caching for the economy feel free to do so, otherwise you may just close the issue report :).\r\n\r\n\r\nBest regards\r\nOlaf"}}