{"html_url": "https://github.com/simonw/datasette/issues/694#issuecomment-648296323", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/694", "id": 648296323, "node_id": "MDEyOklzc3VlQ29tbWVudDY0ODI5NjMyMw==", "user": {"value": 3903726, "label": "kwladyka"}, "created_at": "2020-06-23T17:10:51Z", "updated_at": "2020-06-23T17:10:51Z", "author_association": "NONE", "body": "@simonw \r\n\r\nDid you find the reason? I had similar situation and I check this on millions ways. I am sure app doesn't consume such memory.\r\n\r\nI was trying the app with:\r\n`docker run --rm -it -p 80:80 -m 128M foo`\r\n\r\nI was watching app with `docker stats`. Even limited memory by `CMD [\"java\", \"-Xms60M\", \"-Xmx60M\", \"-jar\", \"api.jar\"]`.\r\nChecked memory usage by app in code and print bash commands. The app definitely doesn't use this memory. Also doesn't write files.\r\n\r\nOnly one solution is to change memory to 512M.\r\n\r\nIt is definitely something wrong with `cloud run`.\r\n\r\nI even did special app for testing this. It looks like when I cross very small amount of code / memory / app size in random when, then memory needs grow +hundreds. Nothing make sense here. Especially it works everywhere expect cloud run.\r\n\r\nPlease let me know if you discovered something more.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 576582604, "label": "datasette publish cloudrun --memory option"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/694#issuecomment-596266190", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/694", "id": 596266190, "node_id": "MDEyOklzc3VlQ29tbWVudDU5NjI2NjE5MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-08T23:32:58Z", "updated_at": "2020-03-08T23:32:58Z", "author_association": "OWNER", "body": "Shipped in [Datasette 0.38](https://datasette.readthedocs.io/en/latest/changelog.html#v0-38).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 576582604, "label": "datasette publish cloudrun --memory option"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/694#issuecomment-595491182", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/694", "id": 595491182, "node_id": "MDEyOklzc3VlQ29tbWVudDU5NTQ5MTE4Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-05T23:07:33Z", "updated_at": "2020-03-05T23:45:38Z", "author_association": "OWNER", "body": "So two things I need to do for this:\r\n\r\n* Add a `--memory` option to `datasette publish cloudrun`\r\n* Maybe capture this error and output a helpful suggestion that you increase the memory with that option? Not sure how feasible that is.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 576582604, "label": "datasette publish cloudrun --memory option"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/694#issuecomment-595498926", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/694", "id": 595498926, "node_id": "MDEyOklzc3VlQ29tbWVudDU5NTQ5ODkyNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-05T23:35:32Z", "updated_at": "2020-03-05T23:35:32Z", "author_association": "OWNER", "body": "Tested that with:\r\n```\r\ndatasette publish cloudrun fixtures.db --memory 512Mi --service fixtures-memory-512mi\r\n```\r\nHere's the result in the Google Cloud web console:\r\n\r\n\"fixtures-m\u2026ory-512mi_\u2013_Service_details_\u2013_Cloud_Run_\u2013_datasette_\u2013_Google_Cloud_Platform_-_Mozilla_Firefox\"\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 576582604, "label": "datasette publish cloudrun --memory option"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/694#issuecomment-595492478", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/694", "id": 595492478, "node_id": "MDEyOklzc3VlQ29tbWVudDU5NTQ5MjQ3OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-05T23:12:25Z", "updated_at": "2020-03-05T23:12:25Z", "author_association": "OWNER", "body": "I wonder if there's some weird reason that we churn through too much RAM on initial datasette startup here? I wouldn't expect startup to use a huge spike of RAM. Maybe need to profile a bit.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 576582604, "label": "datasette publish cloudrun --memory option"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/694#issuecomment-595490889", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/694", "id": 595490889, "node_id": "MDEyOklzc3VlQ29tbWVudDU5NTQ5MDg4OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-05T23:06:30Z", "updated_at": "2020-03-05T23:06:30Z", "author_association": "OWNER", "body": "This fixed it (I tried 1Gi first but that gave the same error):\r\n```\r\ngcloud run deploy --allow-unauthenticated --platform=managed \\\r\n --image gcr.io/datasette-222320/datasette non-profit-ethics --memory=2Gi\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 576582604, "label": "datasette publish cloudrun --memory option"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/694#issuecomment-595489514", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/694", "id": 595489514, "node_id": "MDEyOklzc3VlQ29tbWVudDU5NTQ4OTUxNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-05T23:01:35Z", "updated_at": "2020-03-05T23:01:35Z", "author_association": "OWNER", "body": "Aha! The logs said \"Memory limit of 244M exceeded with 247M used. Consider increasing the memory limit, see https://cloud.google.com/run/docs/configuring/memory-limits\"", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 576582604, "label": "datasette publish cloudrun --memory option"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/694#issuecomment-595489222", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/694", "id": 595489222, "node_id": "MDEyOklzc3VlQ29tbWVudDU5NTQ4OTIyMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-05T23:00:33Z", "updated_at": "2020-03-05T23:00:33Z", "author_association": "OWNER", "body": "The initial `datasette publish cloudrun` failed, now I can replicate that error by running:\r\n```\r\ngcloud run deploy --allow-unauthenticated --platform=managed \\\r\n --image gcr.io/datasette-222320/datasette non-profit-ethics\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 576582604, "label": "datasette publish cloudrun --memory option"}, "performed_via_github_app": null}