$ systemctl status postgresql.service
artifactory.jdbc.url=jdbc:postgresql://127.0.0.1:5432/artifactory artifactory.jdbc.driver=org.postgresql.Driver artifactory.jdbc.username=artifactory artifactory.jdbc.password=password
artifactory.connectionPool.minIdle=5 artifactory.connectionPool.maxActive=50 artifactory.connectionPool.maxWait=10000 artifactory.connectionPool.validationQuery=SELECT 1
确保这些属性未被注释并包含正确的值。
更新 Artifactory 到最新版本。有可能此问题已在新版本中得到修复。
如果上述解决方法不起作用,请检查其他应用程序和服务是否占用了数据库连接。可以通过运行以下命令来查找空闲连接:
select * from pg_stat_activity where state = 'idle';