gpt4 book ai didi

heroku - playframework 2.0 - 超过 max_user_connections 数据库演变(使用本地 postgres 服务器)

转载 作者:行者123 更新时间:2023-12-01 23:34:12 26 4
gpt4 key购买 nike

我遇到了与 ( playframework 2.0 - exceeded max_user_connections on database evolutions?) 完全相同的问题,只是这次是本地 postgres 安装。我在 hub @ http://git.io/CdEntA 上有一个示例应用程序.

我尝试在本地运行它,使用

sbt stage
target/start -DapplyEvolutions.default=true -Ddb.default.driver=org.postgresql.Driver - Ddb.default.url="jdbc:postgresql://localhost:5432/test?user=myuser"

当我启动 http://localhost:9000 时, 我在控制台上看到的是...

[error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection Sleeping for 1000ms and trying again. Attempts left: 10. Exception: null [error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection Sleeping for 1000ms and trying again. Attempts left: 10. Exception: null [info] play - Application started (Prod) [info] play - Listening for HTTP on port 9000... [error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection Sleeping for 1000ms and trying again. Attempts left: 9. Exception: null [error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection Sleeping for 1000ms and trying again. Attempts left: 8. Exception: null [error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection Sleeping for 1000ms and trying again. Attempts left: 7. Exception: null [error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection Sleeping for 1000ms and trying again. Attempts left: 6. Exception: null [error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection Sleeping for 1000ms and trying again. Attempts left: 5. Exception: null [error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection Sleeping for 1000ms and trying again. Attempts left: 4. Exception: null [error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection Sleeping for 1000ms and trying again. Attempts left: 3. Exception: null [error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection Sleeping for 1000ms and trying again. Attempts left: 2. Exception: null [error] c.j.b.h.AbstractConnectionHook - Failed to acquire connection Sleeping for 1000ms and trying again. Attempts left: 1. Exception: null [error] c.j.b.PoolWatchThread - Error in trying to obtain a connection. Retrying in 1000ms org.postgresql.util.PSQLException: FATAL: sorry, too many clients already at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:293) ~[postgresql-9.1-901-1.jdbc4.jar:na]

当我查看数据库时,我发现所有连接实际上都被该进程用完了。

非常感谢任何帮助。

谢谢。

最佳答案

我认为您的问题是您没有覆盖 db.default.user 配置参数,因此它使用的是 sa 值。只需在 conf/application.conf 文件中注释掉以下行:

db.default.user=sa

一旦我这样做并重新运行 sbt stage 然后它对我来说工作正常。

关于heroku - playframework 2.0 - 超过 max_user_connections 数据库演变(使用本地 postgres 服务器),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10303333/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com