{"action":"created","issue":{"url":"https://api.github.com/repos/andresriancho/w3af/issues/11214","labels_url":"https://api.github.com/repos/andresriancho/w3af/issues/11214/labels{/name}","comments_url":"https://api.github.com/repos/andresriancho/w3af/issues/11214/comments","events_url":"https://api.github.com/repos/andresriancho/w3af/issues/11214/events","html_url":"https://github.com/andresriancho/w3af/issues/11214","id":94410967,"number":11214,"title":"Timeout when sending requests to w3af API","user":{"login":"andresriancho","id":865200,"avatar_url":"https://avatars.githubusercontent.com/u/865200?v=3","gravatar_id":"","url":"https://api.github.com/users/andresriancho","html_url":"https://github.com/andresriancho","followers_url":"https://api.github.com/users/andresriancho/followers","following_url":"https://api.github.com/users/andresriancho/following{/other_user}","gists_url":"https://api.github.com/users/andresriancho/gists{/gist_id}","starred_url":"https://api.github.com/users/andresriancho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresriancho/subscriptions","organizations_url":"https://api.github.com/users/andresriancho/orgs","repos_url":"https://api.github.com/users/andresriancho/repos","events_url":"https://api.github.com/users/andresriancho/events{/privacy}","received_events_url":"https://api.github.com/users/andresriancho/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/andresriancho/w3af/labels/bug","name":"bug","color":"e10c02"},{"url":"https://api.github.com/repos/andresriancho/w3af/labels/priority:high","name":"priority:high","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/andresriancho/w3af/milestones/8","html_url":"https://github.com/andresriancho/w3af/milestones/1.7%20-%20REST%20API","labels_url":"https://api.github.com/repos/andresriancho/w3af/milestones/8/labels","id":591375,"number":8,"title":"1.7 - REST API","description":" * Create a REST API wrapper around w3afCore\r\n * Expose the API with w3af_api command line tool which will start a daemon\r\n","creator":{"login":"andresriancho","id":865200,"avatar_url":"https://avatars.githubusercontent.com/u/865200?v=3","gravatar_id":"","url":"https://api.github.com/users/andresriancho","html_url":"https://github.com/andresriancho","followers_url":"https://api.github.com/users/andresriancho/followers","following_url":"https://api.github.com/users/andresriancho/following{/other_user}","gists_url":"https://api.github.com/users/andresriancho/gists{/gist_id}","starred_url":"https://api.github.com/users/andresriancho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresriancho/subscriptions","organizations_url":"https://api.github.com/users/andresriancho/orgs","repos_url":"https://api.github.com/users/andresriancho/repos","events_url":"https://api.github.com/users/andresriancho/events{/privacy}","received_events_url":"https://api.github.com/users/andresriancho/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":21,"state":"open","created_at":"2014-03-08T15:20:13Z","updated_at":"2015-07-10T23:12:00Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-07-10T23:12:00Z","updated_at":"2015-07-10T23:38:38Z","closed_at":null,"body":"I'm getting [timeouts when sending requests to the w3af REST API](https://app.getsentry.com/fogfucom/api/group/71713373/) , there are two reasons for this error:\r\n\r\n * There is a request that is taking a lot of time (needs more investigation)\r\n * The web server is using only one thread for answering requests (confirmed)\r\n\r\nIn order to fix the threading issue, just:\r\n\r\n```python\r\ndef run(self, host=None, port=None, debug=None, **options):\r\n    ...\r\n\r\napp.run(..., threaded=True)\r\n```\r\n\r\nThe important part is to understand which request triggers the \"lock\" in the server. I should get this information from:\r\n * The w3af-api nginx logs after running integration tests\r\n * Other scenario (???)\r\n"},"comment":{"url":"https://api.github.com/repos/andresriancho/w3af/issues/comments/120551127","html_url":"https://github.com/andresriancho/w3af/issues/11214#issuecomment-120551127","issue_url":"https://api.github.com/repos/andresriancho/w3af/issues/11214","id":120551127,"user":{"login":"andresriancho","id":865200,"avatar_url":"https://avatars.githubusercontent.com/u/865200?v=3","gravatar_id":"","url":"https://api.github.com/users/andresriancho","html_url":"https://github.com/andresriancho","followers_url":"https://api.github.com/users/andresriancho/followers","following_url":"https://api.github.com/users/andresriancho/following{/other_user}","gists_url":"https://api.github.com/users/andresriancho/gists{/gist_id}","starred_url":"https://api.github.com/users/andresriancho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresriancho/subscriptions","organizations_url":"https://api.github.com/users/andresriancho/orgs","repos_url":"https://api.github.com/users/andresriancho/repos","events_url":"https://api.github.com/users/andresriancho/events{/privacy}","received_events_url":"https://api.github.com/users/andresriancho/received_events","type":"User","site_admin":false},"created_at":"2015-07-10T23:38:38Z","updated_at":"2015-07-10T23:38:38Z","body":"Note these lines:\r\n\r\n```\r\n172.17.0.4 - - [10/Jul/2015:23:11:44 +0000] \"GET /scans/0/log?id=0 HTTP/1.1\" 499 0 \"-\" \"REST API Client 1.1.3\"\r\n172.17.0.4 - - [10/Jul/2015:23:11:50 +0000] \"GET /scans/0/log?id=0 HTTP/1.1\" 499 0 \"-\" \"REST API Client 1.1.3\"\r\n```\r\n\r\nWhat's 499?"}}