{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/hhvm/issues/7520","repository_url":"https://api.github.com/repos/facebook/hhvm","labels_url":"https://api.github.com/repos/facebook/hhvm/issues/7520/labels{/name}","comments_url":"https://api.github.com/repos/facebook/hhvm/issues/7520/comments","events_url":"https://api.github.com/repos/facebook/hhvm/issues/7520/events","html_url":"https://github.com/facebook/hhvm/issues/7520","id":192928531,"number":7520,"title":"Default 120 second timeout seems impossible to override","user":{"login":"rsouthgate","id":362909,"avatar_url":"https://avatars.githubusercontent.com/u/362909?v=3","gravatar_id":"","url":"https://api.github.com/users/rsouthgate","html_url":"https://github.com/rsouthgate","followers_url":"https://api.github.com/users/rsouthgate/followers","following_url":"https://api.github.com/users/rsouthgate/following{/other_user}","gists_url":"https://api.github.com/users/rsouthgate/gists{/gist_id}","starred_url":"https://api.github.com/users/rsouthgate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsouthgate/subscriptions","organizations_url":"https://api.github.com/users/rsouthgate/orgs","repos_url":"https://api.github.com/users/rsouthgate/repos","events_url":"https://api.github.com/users/rsouthgate/events{/privacy}","received_events_url":"https://api.github.com/users/rsouthgate/received_events","type":"User","site_admin":false},"labels":[{"id":39614012,"url":"https://api.github.com/repos/facebook/hhvm/labels/needs%20more%20info","name":"needs more info","color":"f7c6c7","default":false},{"id":112752741,"url":"https://api.github.com/repos/facebook/hhvm/labels/no%20isolated%20repro","name":"no isolated repro","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-01T18:42:04Z","updated_at":"2016-12-12T03:49:27Z","closed_at":null,"body":"### HHVM Version\r\n3.15.0\r\n\r\n### Standalone code, or other way to reproduce the problem\r\n/etc/hhvm/php.ini:\r\n\r\n```\r\n; php options\r\nsession.save_handler = files\r\nsession.save_path = /var/lib/hhvm/sessions\r\nsession.gc_maxlifetime = 1440\r\nmemory_limit = 6000M\r\nmax_execution_time = 900\r\nmax_input_time = 60\r\n\r\n; hhvm specific\r\nhhvm.log.level = Warning\r\nhhvm.log.always_log_unhandled_exceptions = true\r\nhhvm.log.runtime_error_reporting_level = 8191\r\nhhvm.mysql.typed_results = false\r\n\r\nhhvm.server.connection_timeout_seconds = 900\r\nhhvm.server.request_timeout_seconds = 900\r\n```\r\n\r\n### Expected result\r\nScript should run for 900 seconds\r\n\r\n### Actual result\r\nFatal Error after 120 seconds. Actual error message:\r\n```\r\n\\nFatal error: entire web request took longer than 120 seconds and timed out\r\n```\r\n(Also, as an aside... Strange that hhvm always seems to log the line breaks encoded).\r\n\r\nThe max execution time defined in the php ini seems respected when invoking test scripts from CLI. But the particular setup where I see the fatal error in the logs is when the script is invoked from a server connection (nginx -> unix socket to hhvm. Nginx hast a fastcgi read timeout also set to 900 seconds). Script initialised from a wget call in cron. In addition the script being called has a set_time_limit(900) which also seems to be ignored."},"comment":{"url":"https://api.github.com/repos/facebook/hhvm/issues/comments/266337420","html_url":"https://github.com/facebook/hhvm/issues/7520#issuecomment-266337420","issue_url":"https://api.github.com/repos/facebook/hhvm/issues/7520","id":266337420,"user":{"login":"rsouthgate","id":362909,"avatar_url":"https://avatars.githubusercontent.com/u/362909?v=3","gravatar_id":"","url":"https://api.github.com/users/rsouthgate","html_url":"https://github.com/rsouthgate","followers_url":"https://api.github.com/users/rsouthgate/followers","following_url":"https://api.github.com/users/rsouthgate/following{/other_user}","gists_url":"https://api.github.com/users/rsouthgate/gists{/gist_id}","starred_url":"https://api.github.com/users/rsouthgate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsouthgate/subscriptions","organizations_url":"https://api.github.com/users/rsouthgate/orgs","repos_url":"https://api.github.com/users/rsouthgate/repos","events_url":"https://api.github.com/users/rsouthgate/events{/privacy}","received_events_url":"https://api.github.com/users/rsouthgate/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T03:49:27Z","updated_at":"2016-12-12T03:49:27Z","body":"Apologies, I tried to recreate a test case for repro but on simple scenarios where I tell php to sleep my max_execution_time is always respected, so in looking further I'm trying to understand under what other circumstances HHVM will through that fatal error.\r\n\r\nI've tried looking through the HHVM source but I'm no c++ expert so could someone tell me is there more than one scenario where that exception can be thrown? \r\n\r\nBecause in the logs, taking one example I see the error thrown at 11:03:21\r\n```\r\n[Sun Dec 11 11:03:21 2016] [hphp] [1078:7f109d7ff700:7521:000195] [] \\nFatal error: entire web request took longer than 120 seconds and timed out\r\n```\r\nBut when I look back at that `1078:7f109d7ff700:7521:000195` which I assume identifies this thread the first entry is `[Sun Dec 11 11:00:02 2016] [hphp] [1078:7f109d7ff700:7521:000001]` which to me implies it's been running 200 seconds when the error is thrown (but that is not a consistent time - there are plenty of other threads killed in the same vein but after 220, 240 seconds etc). \r\n\r\nSo is it possible that HHVM spawns threads within the main thread for other tasks and these are assigned a different timeout? In looking through the HHVM codebase (and having a poor understanding of c++) I can see timeouts set in vhosts and the xbox server for various request handlers. The xbox server seems to have a default timeout of 120 seconds but from the docs it sounds like I'd be needing to explicitly instantiate that for messaging queues and I'm not."}}
{"actor":{"display_login":"rsouthgate"}}