{"action":"created","issue":{"url":"https://api.github.com/repos/revive-adserver/revive-adserver/issues/518","labels_url":"https://api.github.com/repos/revive-adserver/revive-adserver/issues/518/labels{/name}","comments_url":"https://api.github.com/repos/revive-adserver/revive-adserver/issues/518/comments","events_url":"https://api.github.com/repos/revive-adserver/revive-adserver/issues/518/events","html_url":"https://github.com/revive-adserver/revive-adserver/issues/518","id":69309967,"number":518,"title":"Exceeded the Maximum execution time for \"User Log\"","user":{"login":"karen-mikaela","id":761416,"avatar_url":"https://avatars.githubusercontent.com/u/761416?v=3","gravatar_id":"","url":"https://api.github.com/users/karen-mikaela","html_url":"https://github.com/karen-mikaela","followers_url":"https://api.github.com/users/karen-mikaela/followers","following_url":"https://api.github.com/users/karen-mikaela/following{/other_user}","gists_url":"https://api.github.com/users/karen-mikaela/gists{/gist_id}","starred_url":"https://api.github.com/users/karen-mikaela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karen-mikaela/subscriptions","organizations_url":"https://api.github.com/users/karen-mikaela/orgs","repos_url":"https://api.github.com/users/karen-mikaela/repos","events_url":"https://api.github.com/users/karen-mikaela/events{/privacy}","received_events_url":"https://api.github.com/users/karen-mikaela/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/revive-adserver/revive-adserver/labels/code%20improvement","name":"code improvement","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-18T13:37:45Z","updated_at":"2015-04-18T13:43:20Z","closed_at":null,"body":"My revive application has a huge records number in audit table.\r\nWhen I go to the \"User Log\" area, I receive the below message:\r\nFatal error: Maximum execution time of 30 seconds exceeded in revive/lib/max/Dal/DataObjects/DB_DataObjectCommon.php on line 900\r\nI tried to increase the timeout but another error happens:\r\n\"PHP message: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 89 bytes) in revive/lib/max/Dal/DataObjects/DB_DataObjectCommon.php on line 898\r\nWell, I think the problem is because the at the first time that you have used no filters, there is any limit for the main query.\r\n\r\n```sql\r\nSELECT *\r\nFROM rv_audit\r\nWHERE ( parentid IS NULL ) \r\nORDER BY updated DESC\r\n```\r\n \r\nSo,I added a else clause with limit to 500 in OA_Dll_Audit::getAuditLog in lines below:\r\n\r\n```php\r\nif ((!empty($aParam['startRecord']) || $aParam['startRecord'] >= 0) && $aParam['perPage']) {\r\n    $doAudit->limit($aParam['startRecord'], $aParam['perPage']);\r\n}else{\r\n    $doAudit->limit(0,500);\r\n}\r\n```\r\n\r\nI am not sure if is the best solution. I would to know if there are another solutions for this problem.\r\n"},"comment":{"url":"https://api.github.com/repos/revive-adserver/revive-adserver/issues/comments/94165676","html_url":"https://github.com/revive-adserver/revive-adserver/issues/518#issuecomment-94165676","issue_url":"https://api.github.com/repos/revive-adserver/revive-adserver/issues/518","id":94165676,"user":{"login":"erikgeurts","id":5102461,"avatar_url":"https://avatars.githubusercontent.com/u/5102461?v=3","gravatar_id":"","url":"https://api.github.com/users/erikgeurts","html_url":"https://github.com/erikgeurts","followers_url":"https://api.github.com/users/erikgeurts/followers","following_url":"https://api.github.com/users/erikgeurts/following{/other_user}","gists_url":"https://api.github.com/users/erikgeurts/gists{/gist_id}","starred_url":"https://api.github.com/users/erikgeurts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikgeurts/subscriptions","organizations_url":"https://api.github.com/users/erikgeurts/orgs","repos_url":"https://api.github.com/users/erikgeurts/repos","events_url":"https://api.github.com/users/erikgeurts/events{/privacy}","received_events_url":"https://api.github.com/users/erikgeurts/received_events","type":"User","site_admin":false},"created_at":"2015-04-18T13:43:20Z","updated_at":"2015-04-18T13:43:20Z","body":"@karen-mikaela Would you be able to create a pull request for this proposed improvement?"}}