2009-07-07 86 views
-1

偶爾我在Postgres中遇到這些錯誤。偶爾有PostgresSQL連接錯誤

  1. org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

  2. org.postgresql.util.PSQLException: FATAL: sorry, too many clients already

,當我重新啓動服務器收到此錯誤後,我的數據庫會工作。

回答

0

你可以發佈更多關於你的設置 - 語言和庫(我想這是Java和JDBC),服務器版本,什麼是它的目的(開發或生產)等

你得到第二個錯誤是非常明確的 - 您超過了配置的服務器連接數。檢查服務器配置中的"max_connections"參數,並在擁有資源時增加它。

第一個錯誤AFAICS是一個常規連接錯誤。我不知道什麼可能會導致這種情況(除了服務器崩潰,我懷疑是這種情況)。