{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Home/issues/1181","labels_url":"https://api.github.com/repos/aspnet/Home/issues/1181/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Home/issues/1181/comments","events_url":"https://api.github.com/repos/aspnet/Home/issues/1181/events","html_url":"https://github.com/aspnet/Home/issues/1181","id":122656558,"number":1181,"title":"RC1 update1 works very slow on Linux/Mono","user":{"login":"yaapelsinko","id":9496612,"avatar_url":"https://avatars.githubusercontent.com/u/9496612?v=3","gravatar_id":"","url":"https://api.github.com/users/yaapelsinko","html_url":"https://github.com/yaapelsinko","followers_url":"https://api.github.com/users/yaapelsinko/followers","following_url":"https://api.github.com/users/yaapelsinko/following{/other_user}","gists_url":"https://api.github.com/users/yaapelsinko/gists{/gist_id}","starred_url":"https://api.github.com/users/yaapelsinko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaapelsinko/subscriptions","organizations_url":"https://api.github.com/users/yaapelsinko/orgs","repos_url":"https://api.github.com/users/yaapelsinko/repos","events_url":"https://api.github.com/users/yaapelsinko/events{/privacy}","received_events_url":"https://api.github.com/users/yaapelsinko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-12-17T03:58:44Z","updated_at":"2015-12-17T08:32:27Z","closed_at":null,"body":"I've ran into the issue with my application, so to test if it is the app or something else I've created a template ASP.NET 5 app (web app template, not empty, no authorization). It targeted solely to dnx451 framework and is built under Linux/Mono without any warnings.\r\n\r\nTo host it I've created a clean Ubuntu-1404-trusty-64-minimal installation. Server is a VM with 1 vCore and 1GB RAM.\r\n\r\nI've installed DNVM with Mono runtime, rc1-update1, and libuv according to this: https://docs.asp.net/en/latest/getting-started/installing-on-linux.html\r\nInstalled Mono like described here: http://www.mono-project.com/docs/getting-started/install/linux/ (4.2.1 version is shown on mono -V)\r\n\r\nApplication is started by Supervisor tool, with config:\r\n\r\ncommand=su -c \"/root/.dnx/runtimes/dnx-mono.1.0.0-rc1-update1/bin/dnx web\" root directory=/var/www/test\r\nautorestart=true \r\nautostart=true \r\nstdout_logfile=/var/www/test/logs/app_std_out.log \r\nstderr_logfile=/var/www/test/logs/app_err.log\r\n\r\nThen requests are passed to application by nginx:\r\n\r\nserver {\r\nlisten 80; \r\nserver_name test.ru; // resolved by \"hosts\" file \r\nlocation / { \r\nproxy_set_header    Host $host; \r\nproxy_set_header    X-Real-IP   $remote_addr; \r\nproxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for; \r\nproxy_pass  http://127.0.0.1:5002; \r\n}\r\n}\r\n\r\nIn app_std log I see the app is started up normally and reporting it's listening on its port:\r\n\r\nHosting environment: Production\r\nNow listening on: http://localhost:5002\r\nApplication started. Press Ctrl+C to shut down.\r\n\r\nOnce I made a request I usually see:\r\n\r\n^[[32minfo^[[39m^[[37m: Microsoft.AspNet.Hosting.Internal.HostingEngine[1]^[[39m\r\n^[[97m      Request starting HTTP/1.0 GET http://test.ru/  ^[[39m\r\n^[[32minfo^[[39m^[[37m: Microsoft.AspNet.Mvc.Controllers.ControllerActionInvoker[1]^[[39m\r\n^[[97m      Executing action method Test.Controllers.HomeController.Index with arguments () - ModelState is Valid'^[[39m\r\n\r\nAnd this is it. Sometimes the page is finally served (so I see log records about calling a view, then serving linked resouces and files, etc), but response times in browser are huge (like 60 seconds for the page and 0.3-0.5 for any linked css or jpg). At the same time app log says in such cases that the request is processed in about 0.6 sec for a page and a few milliseconds for files.\r\n\r\n(strange - page is rendered in about 0.6, and loaded in about 60, then file served in 0.003, but loaded in 0.3, i.e. always about 100x longer that it recorded in app log) \r\n\r\nIt looks like there is some huge delay between actions calling. For example, executing an action method, that loooong delay before rendering a view, then looooong delay to do something else and so on.\r\n\r\nHowever, it often ends in nginx just returning 504. Sometimes page is loading only partially. \r\n\r\nWhen 504, it is just 504 in nginx log. Like it wasn't nginx fault, but the application not responded and the request was timed out. Oh, and the default page nginx is showing once it installed is loading instantly.\r\n\r\nWhat else, apart of reading logs, can I do to diagnose it?\r\n\r\nI've already did the same setup recently, but with beta8 (and, well, maybe actual versions of mono/libuv/etc were a bit different), and it worked well. But not this time. :/"},"comment":{"url":"https://api.github.com/repos/aspnet/Home/issues/comments/165383266","html_url":"https://github.com/aspnet/Home/issues/1181#issuecomment-165383266","issue_url":"https://api.github.com/repos/aspnet/Home/issues/1181","id":165383266,"user":{"login":"davidfowl","id":95136,"avatar_url":"https://avatars.githubusercontent.com/u/95136?v=3","gravatar_id":"","url":"https://api.github.com/users/davidfowl","html_url":"https://github.com/davidfowl","followers_url":"https://api.github.com/users/davidfowl/followers","following_url":"https://api.github.com/users/davidfowl/following{/other_user}","gists_url":"https://api.github.com/users/davidfowl/gists{/gist_id}","starred_url":"https://api.github.com/users/davidfowl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidfowl/subscriptions","organizations_url":"https://api.github.com/users/davidfowl/orgs","repos_url":"https://api.github.com/users/davidfowl/repos","events_url":"https://api.github.com/users/davidfowl/events{/privacy}","received_events_url":"https://api.github.com/users/davidfowl/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T08:32:27Z","updated_at":"2015-12-17T08:32:27Z","body":"If you can provide a repository with an application and instructions on how to reproduce the problem on CoreCLR, we can take a look.\r\n\r\n/cc @halter73 @cesarbs \r\n"}}