{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-functions-host/issues/2667","repository_url":"https://api.github.com/repos/Azure/azure-functions-host","labels_url":"https://api.github.com/repos/Azure/azure-functions-host/issues/2667/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-functions-host/issues/2667/comments","events_url":"https://api.github.com/repos/Azure/azure-functions-host/issues/2667/events","html_url":"https://github.com/Azure/azure-functions-host/issues/2667","id":313741370,"node_id":"MDU6SXNzdWUzMTM3NDEzNzA=","number":2667,"title":"Function executing in parallel despite maxConcurrentCalls=1","user":{"login":"rogersmj","id":20134,"node_id":"MDQ6VXNlcjIwMTM0","avatar_url":"https://avatars2.githubusercontent.com/u/20134?v=4","gravatar_id":"","url":"https://api.github.com/users/rogersmj","html_url":"https://github.com/rogersmj","followers_url":"https://api.github.com/users/rogersmj/followers","following_url":"https://api.github.com/users/rogersmj/following{/other_user}","gists_url":"https://api.github.com/users/rogersmj/gists{/gist_id}","starred_url":"https://api.github.com/users/rogersmj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogersmj/subscriptions","organizations_url":"https://api.github.com/users/rogersmj/orgs","repos_url":"https://api.github.com/users/rogersmj/repos","events_url":"https://api.github.com/users/rogersmj/events{/privacy}","received_events_url":"https://api.github.com/users/rogersmj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/Azure/azure-functions-host/milestones/24","html_url":"https://github.com/Azure/azure-functions-host/milestone/24","labels_url":"https://api.github.com/repos/Azure/azure-functions-host/milestones/24/labels","id":2551635,"node_id":"MDk6TWlsZXN0b25lMjU1MTYzNQ==","number":24,"title":"Active Questions","description":"","creator":{"login":"christopheranderson","id":2252976,"node_id":"MDQ6VXNlcjIyNTI5NzY=","avatar_url":"https://avatars2.githubusercontent.com/u/2252976?v=4","gravatar_id":"","url":"https://api.github.com/users/christopheranderson","html_url":"https://github.com/christopheranderson","followers_url":"https://api.github.com/users/christopheranderson/followers","following_url":"https://api.github.com/users/christopheranderson/following{/other_user}","gists_url":"https://api.github.com/users/christopheranderson/gists{/gist_id}","starred_url":"https://api.github.com/users/christopheranderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christopheranderson/subscriptions","organizations_url":"https://api.github.com/users/christopheranderson/orgs","repos_url":"https://api.github.com/users/christopheranderson/repos","events_url":"https://api.github.com/users/christopheranderson/events{/privacy}","received_events_url":"https://api.github.com/users/christopheranderson/received_events","type":"User","site_admin":false},"open_issues":113,"closed_issues":101,"state":"open","created_at":"2017-05-30T20:58:47Z","updated_at":"2018-08-14T22:39:51Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2018-04-12T14:03:00Z","updated_at":"2018-08-15T13:53:55Z","closed_at":null,"author_association":"NONE","body":"#### Investigative information\r\n\r\nPlease provide the following:\r\n\r\n- Timestamp: 2018-04-12T13:49:33.128Z\r\n- Function App version (1.0 or 2.0-beta): 1.x\r\n- Function App name:\r\n- Function name(s) (as appropriate):\r\n- Invocation ID: 04082261-42bd-402b-9b3c-2e1522cae883 and eb424b52-7334-4a0d-930d-41951f821831\r\n- Region: East US\r\n\r\n#### Repro steps\r\n\r\nProvide the steps required to reproduce the problem:\r\n\r\n1. Setup a long-running Service Bus topic triggered function. In the function's host.json, set maxConcurrentCalls to 1 as described in the [host.json reference documentation](https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json).\r\n2. Post a message to the topic that will trigger your function.\r\n3. Observe the function start to execute\r\n4. Post another message to the topic with different content.\r\n5. Observe another instance of the function begin to execute in parallel to the first.\r\n\r\n#### Expected behavior\r\n\r\nWith maxConcurrentCalls=1, I would expect another instance of the function to not kick off until the first one has completed and released its lock on the topic message.\r\n\r\n#### Actual behavior\r\n\r\nMultiple instances of the function are executing in parallel.\r\n\r\n#### Known workarounds\r\n\r\n?\r\n\r\n#### Related information \r\n\r\n* Function written in node.js\r\n* Uses message content from topic to make several API calls to other services.\r\n* I am experiencing this behavior both in a locally run Functions host on Windows 10 as well as in Azure.\r\n* I am currently trying to limit this to 1 execution at a time in my dev environment to test the general concept of limiting parallel execution. In production, I will need to limit this to 5 or 6 parallel executions.\r\n"},"comment":{"url":"https://api.github.com/repos/Azure/azure-functions-host/issues/comments/413204451","html_url":"https://github.com/Azure/azure-functions-host/issues/2667#issuecomment-413204451","issue_url":"https://api.github.com/repos/Azure/azure-functions-host/issues/2667","id":413204451,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzIwNDQ1MQ==","user":{"login":"MisinformedDNA","id":1784452,"node_id":"MDQ6VXNlcjE3ODQ0NTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1784452?v=4","gravatar_id":"","url":"https://api.github.com/users/MisinformedDNA","html_url":"https://github.com/MisinformedDNA","followers_url":"https://api.github.com/users/MisinformedDNA/followers","following_url":"https://api.github.com/users/MisinformedDNA/following{/other_user}","gists_url":"https://api.github.com/users/MisinformedDNA/gists{/gist_id}","starred_url":"https://api.github.com/users/MisinformedDNA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MisinformedDNA/subscriptions","organizations_url":"https://api.github.com/users/MisinformedDNA/orgs","repos_url":"https://api.github.com/users/MisinformedDNA/repos","events_url":"https://api.github.com/users/MisinformedDNA/events{/privacy}","received_events_url":"https://api.github.com/users/MisinformedDNA/received_events","type":"User","site_admin":false},"created_at":"2018-08-15T13:53:55Z","updated_at":"2018-08-15T13:53:55Z","author_association":"NONE","body":"@markusfoss Did you look into this: `WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT`?"}}
{"actor":{"display_login":"MisinformedDNA"}}