{"html_url": "https://github.com/simonw/datasette/issues/633#issuecomment-620841496", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/633", "id": 620841496, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMDg0MTQ5Ng==", "user": {"value": 46165, "label": "nryberg"}, "created_at": "2020-04-28T20:37:50Z", "updated_at": "2020-04-28T20:37:50Z", "author_association": "NONE", "body": "Using the Heroku web interface, you can set the WEB_CONCURRENCY = 1\r\n\r\n![image](https://user-images.githubusercontent.com/46165/80535319-352c8100-8966-11ea-9d4f-df2622ec8bff.png)\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 522334771, "label": "Publish to Heroku is broken: \"WARNING: You must pass the application as an import string to enable 'reload' or 'workers\""}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/633#issuecomment-553483633", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/633", "id": 553483633, "node_id": "MDEyOklzc3VlQ29tbWVudDU1MzQ4MzYzMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-13T16:36:02Z", "updated_at": "2019-11-13T16:36:35Z", "author_association": "OWNER", "body": "Short term fix: set `--workers=1` when publishing with Heroku. Or even easier - set WEB_CONCURRENCY to 1.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 522334771, "label": "Publish to Heroku is broken: \"WARNING: You must pass the application as an import string to enable 'reload' or 'workers\""}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/633#issuecomment-553483419", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/633", "id": 553483419, "node_id": "MDEyOklzc3VlQ29tbWVudDU1MzQ4MzQxOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-13T16:35:34Z", "updated_at": "2019-11-13T16:35:34Z", "author_association": "OWNER", "body": "The problem is this code in uvicorn: https://github.com/encode/uvicorn/blob/020dd085a0a5b609f14ddd2b36fc0a97ba4df019/uvicorn/main.py#L297-L302\r\n```python\r\n if (config.reload or config.workers > 1) and not isinstance(app, str):\r\n logger = logging.getLogger(\"uvicorn.error\")\r\n logger.warn(\r\n \"You must pass the application as an import string to enable 'reload' or 'workers'.\"\r\n )\r\n sys.exit(1)\r\n```\r\nFrom this commit 4 days ago: https://github.com/encode/uvicorn/commit/b034f7a136c5e57a33ffd10ce2404cc1faee9033 - see Uvicorn https://github.com/encode/uvicorn/issues/478 and https://github.com/encode/uvicorn/pull/481\r\n\r\nThis is breaking because `--workers` \"Defaults to the $WEB_CONCURRENCY environment variable if available\" - and it turns out on Heroku WEB_CONCURRENCY is set to 2 by default!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 522334771, "label": "Publish to Heroku is broken: \"WARNING: You must pass the application as an import string to enable 'reload' or 'workers\""}, "performed_via_github_app": null}