Tôi đang cố gắng thiết lập máy chủ PostgreSQL dev. Nó đang chạy và tôi có thể tạo vai trò, bảng, v.v. từ dòng lệnh. Tuy nhiên, khi tôi cố gắng áp dụng các diễn biến bằng cách sử dụng Play, tôi nhận được lỗi sau:Diễn biến PostgreSQL: "PSQLException: FATAL: xin lỗi, quá nhiều khách hàng đã"
org.postgresql.util.PSQLException: FATAL: sorry, too many clients already
Tôi có thể kết nối và nếu tôi đặt sai mục đích, nó sẽ trả về lỗi cú pháp để tôi biết rằng Play có thể kết nối với cơ sở dữ liệu. Tuy nhiên, sau khi quá trình tiến hóa được áp dụng thành công, tôi nhận được lỗi được hiển thị ở trên.
Tôi không hiểu rõ về quản trị PostgreSQl vì vậy tôi không chắc liệu sự cố xảy ra với Play hay cài đặt PostgreSQL của tôi. Tôi vừa cài đặt nó bằng cách sử dụng Postgres.app của Heroku trên máy Mac chạy Mountain Lion.
Đây là những gì được ghi vào giao diện điều khiển:
! @6cnb0blpp - Internal server error, for request [GET /] ->
play.api.db.evolutions.InvalidDatabaseRevision: Database 'default' needs evolution! [An SQL script need to be run on your database.]
at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1$$anonfun$apply$1.apply$mcV$sp(Evolutions.scala:427) ~[play_2.9.1.jar:2.0.4]
at play.api.db.evolutions.EvolutionsPlugin.withLock(Evolutions.scala:448) ~[play_2.9.1.jar:2.0.4]
at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:414) ~[play_2.9.1.jar:2.0.4]
at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:412) ~[play_2.9.1.jar:2.0.4]
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59) ~[scala-library.jar:0.11.3]
at scala.collection.immutable.List.foreach(List.scala:45) ~[scala-library.jar:0.11.3]
[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: 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] application -
Cảm ơn!
Tôi đã thiết lập các cài đặt đó trong tệp tin application.conf của mình nhưng vẫn kết thúc với cùng một kết quả. Tôi đã kết nối với PostgreSQL trong quá khứ với Play và tôi chưa bao giờ gặp vấn đề này, tôi thực sự bối rối. – Ryan