{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/568","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/568/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/568/comments","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/568/events","html_url":"https://github.com/Azure/azure-webjobs-sdk/issues/568","id":106128059,"number":568,"title":"Azure Webjob Logging beyond 8 hours","user":{"login":"NVentimiglia","id":125889,"avatar_url":"https://avatars.githubusercontent.com/u/125889?v=3","gravatar_id":"","url":"https://api.github.com/users/NVentimiglia","html_url":"https://github.com/NVentimiglia","followers_url":"https://api.github.com/users/NVentimiglia/followers","following_url":"https://api.github.com/users/NVentimiglia/following{/other_user}","gists_url":"https://api.github.com/users/NVentimiglia/gists{/gist_id}","starred_url":"https://api.github.com/users/NVentimiglia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NVentimiglia/subscriptions","organizations_url":"https://api.github.com/users/NVentimiglia/orgs","repos_url":"https://api.github.com/users/NVentimiglia/repos","events_url":"https://api.github.com/users/NVentimiglia/events{/privacy}","received_events_url":"https://api.github.com/users/NVentimiglia/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-12T04:18:09Z","updated_at":"2015-09-30T03:22:03Z","closed_at":"2015-09-23T17:45:10Z","body":"I have a web job hosted on azure. I noticed that the logging system only retains logs for 8 hours. I have hooked up storage but that did not help. I feel I may be doing something wrong. \r\n\r\nHere is my program.cs\r\n\r\n`````\r\n /// <summary>\r\n    /// https://azure.microsoft.com/en-us/documentation/articles/websites-dotnet-webjobs-sdk-get-started/\r\n    /// </summary>\r\n    class Program\r\n    {\r\n        // Please set the following connection strings in app.config for this WebJob to run:\r\n        // AzureWebJobsDashboard and AzureWebJobsStorage\r\n        static void Main()\r\n        {\r\n        \r\n            //Call static method which does work. Work lasts 7 seconds or so.\r\n             \r\n\r\n            // If we go beyond this the WebJob will fail, says 120 second timeout.\r\n            return;\r\n\r\n            var host = new JobHost();           \r\n            host.RunAndBlock();\r\n        }\r\n    }\r\n`````\r\n\r\nAs you can see one big red flag is my use of JobHost. Whenever I put my code in functions.cs and run the JobHost it starts fine, but, the application ceases to work correctly. It just runs for 120 seconds, executing no desired code, and then throws an exception I read in the integrated logging.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/comments/144270840","html_url":"https://github.com/Azure/azure-webjobs-sdk/issues/568#issuecomment-144270840","issue_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk/issues/568","id":144270840,"user":{"login":"mathewc","id":1056548,"avatar_url":"https://avatars.githubusercontent.com/u/1056548?v=3","gravatar_id":"","url":"https://api.github.com/users/mathewc","html_url":"https://github.com/mathewc","followers_url":"https://api.github.com/users/mathewc/followers","following_url":"https://api.github.com/users/mathewc/following{/other_user}","gists_url":"https://api.github.com/users/mathewc/gists{/gist_id}","starred_url":"https://api.github.com/users/mathewc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathewc/subscriptions","organizations_url":"https://api.github.com/users/mathewc/orgs","repos_url":"https://api.github.com/users/mathewc/repos","events_url":"https://api.github.com/users/mathewc/events{/privacy}","received_events_url":"https://api.github.com/users/mathewc/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T03:22:03Z","updated_at":"2015-09-30T03:22:03Z","body":"I mentioned CallAsync because I thought that was what you were doing based on your \"Call static method which does work\" code comment earlier above.\r\n\r\nWhat kind of job function are you trying to run? Generally when using the SDK you will be running your code in a Continuous WebJob ([as detailed here](https://github.com/projectkudu/kudu/wiki/Web-jobs)). As in the HelloWorld sample you linked to above, you will call RunAndBlock which will keep the SDK JobHost alive running your function.\r\n\r\nPlease provide details/code for the function you're having problems with so we can help. Thanks :)"}}