英文:
`supabase start` on Windows failing
问题
我正在运行 Windows 11 并已按照文档的说明通过 Scoop 安装了 supabase 命令行工具。我将其添加到现有存储库中,因此已经运行了以下命令,并没有出现任何问题:
supabase login
supabase init
当我尝试运行 supabase start
时,第一次完全安装了 Docker 映像和一切,但它总是以以下错误消息结束:
> supabase start
数据库不正常。
错误:无法连接到 `host=localhost user=postgres database=postgres`:无法接收消息(意外的EOF)
请尝试使用 --debug 标志重新运行命令以排除错误。
我尝试按照指示使用 --debug
标志运行,但似乎无法从中获取任何信息,而且出现了不同的问题:
... 2023/03/11 22:46:09 Send Done
2023/03/11 22:46:09 Recv First Byte
2023/03/11 22:46:10 Sent Header: Host [docker]
2023/03/11 22:46:10 Sent Header: User-Agent [Go-http-client/1.1]
2023/03/11 22:46:10 Send Done
2023/03/11 22:46:10 Recv First Byte
数据库不正常。
2023/03/11 22:46:11 Connect Start: tcp [::1]:54322
2023/03/11 22:46:11 Connect Done: tcp [::1]:54322
2023/03/11 22:46:11 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres"}}
2023/03/11 22:46:13 Connect Start: tcp 127.0.0.1:54322
2023/03/11 22:46:13 Connect Done: tcp 127.0.0.1:54322
2023/03/11 22:46:13 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres"}}
2023/03/11 22:46:15 Connect Start: tcp [::1]:54322
2023/03/11 22:46:15 Connect Done: tcp [::1]:54322
2023/03/11 22:46:15 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres"}}
2023/03/11 22:46:17 Connect Start: tcp 127.0.0.1:54322
2023/03/11 22:46:17 Connect Done: tcp 127.0.0.1:54322
2023/03/11 22:46:17 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres"}}
错误:无法连接到 `host=localhost user=postgres database=postgres`:无法接收消息(超时:上下文截止期限已过)
我正在使用 supabase init
创建的默认配置文件 config.toml
。
版本信息:
> docker --version
Docker 版本 20.10.22,构建 3a2c30b
> docker-compose --version
Docker Compose 版本 v2.15.1
> supabase -v
1.40.1
英文:
I am running Windows 11 and have installed the supabase cli via Scoop per the documentation. I am adding it to an existing repository so I have already ran the below commands with no issue:
supabase login
supabase init
When I go to run supabase start
it fully installed the docker image and everything the first time, but it always ends with the below error message:
> supabase start
Database is not healthy.
Error: failed to connect to `host=localhost user=postgres database=postgres`: failed to receive message (unexpected EOF)
Try rerunning the command with --debug to troubleshoot the error.
I tried running with the --debug
flag as instructed but I can't seem to tell any info from that and it fails with a different issue:
... 2023/03/11 22:46:09 Send Done
2023/03/11 22:46:09 Recv First Byte
2023/03/11 22:46:10 Sent Header: Host [docker]
2023/03/11 22:46:10 Sent Header: User-Agent [Go-http-client/1.1]
2023/03/11 22:46:10 Send Done
2023/03/11 22:46:10 Recv First Byte
Database is not healthy.
2023/03/11 22:46:11 Connect Start: tcp [::1]:54322
2023/03/11 22:46:11 Connect Done: tcp [::1]:54322
2023/03/11 22:46:11 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres"}}
2023/03/11 22:46:13 Connect Start: tcp 127.0.0.1:54322
2023/03/11 22:46:13 Connect Done: tcp 127.0.0.1:54322
2023/03/11 22:46:13 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres"}}
2023/03/11 22:46:15 Connect Start: tcp [::1]:54322
2023/03/11 22:46:15 Connect Done: tcp [::1]:54322
2023/03/11 22:46:15 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres"}}
2023/03/11 22:46:17 Connect Start: tcp 127.0.0.1:54322
2023/03/11 22:46:17 Connect Done: tcp 127.0.0.1:54322
2023/03/11 22:46:17 PG Send: {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"database":"postgres","user":"postgres"}}
Error: failed to connect to `host=localhost user=postgres database=postgres`: failed to receive message (timeout: context deadline exceeded)
I am running with just the default config.toml from supabase init
Versions:
> docker --version
Docker version 20.10.22, build 3a2c30b
> docker-compose --version
Docker Compose version v2.15.1
> supabase -v
1.40.1
答案1
得分: 2
I only have superficial knowledge of supabase
but, according to the symptoms you described, it seems that from time to time the postgresql
container is unable to provide a health probe fast enough and that makes the supabase start
command to fail.
The problem is especially of relevance the first time you issue supabase start
because in that case the postgresql
container should initialize the required database structures and associated stuff.
As stated for example in this related Github issue I think the problem could be very likely motivated by insufficient physical machine resources.
Unfortunately, AFAIK, supabase
doesn't provide any flag or configuration option for defining some type of timeout for controlling how long to wait for the health probes.
To solve the problem, you may try running the product using the supabase start
--ignore-health-check
flag:
supabase start --ignore-health-check
but probably the way to go should be vertical scaling your physical machine providing more resources, especially RAM memory. It running Windows 11 probably you will need to configure the Docker for Windows memory limits: this related SO question could be of help regarding this configuration as well.
英文:
I only have superficial knowledge of supabase
but, according to the symptoms you described, it seems that from time to time the postgresql
container is unable to provide a health probe fast enough and that makes the supabase start
command to fail.
The problem is especially of relevance the first time you issue supabase start
because in that case the postgresql
container should initialize the required database structures and associated stuff.
As stated for example in this related Github issue I think the problem could be very likely motivated by insufficient physical machine resources.
Unfortunately, AFAIK, supabase
doesn't provide any flag or configuration option for defining some type of timeout for controlling how long to wait for the health probes.
To solve the problem, you may try running the product using the supabase start
--ignore-health-check
flag:
supabase start --ignore-health-check
but probably the way to go should be vertical scaling your physical machine providing more resources, especially RAM memory. It running Windows 11 probably you will need to configure the Docker for Windows memory limits: this related SO question could be of help regarding this configuration as well.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论