waitOnLOck on several threads when db connection lost

Поиск
Список
Период
Сортировка
От Leonard Meyer
Тема waitOnLOck on several threads when db connection lost
Дата
Msg-id CADGbXSQxfrWASc3xRa08P9VRxyy3eHQ_J5nBiVY7rZVRe0JPLA@mail.gmail.com
обсуждение исходный текст
Список pgsql-jdbc
Hi,

Basically I'm using Akka with postrgeSQL JDBC API. For those who doesn't know Akka, just know that I have several actors (i.e threads in my case) doing COPY from incoming files. I'm testing the resilience of my system by stopping and restarting the database during processing. My problem is that during restarts, some of my threads (seems random) just stay hanging for a lock...

I already posted on the Akka mailing list, thinking I was just doing things wrong, but given the responses I thought I should come here.

Please visit https://groups.google.com/forum/#!topic/akka-user/Ehzioy3jVoU for detailed informations and stacktraces. Here's the diagnosis of HikariCP main developper :

"It appears that you are using the PostgreSQL CopyManager, correct?  Looking at QueryExecutorImpl it appears that rollback() is trying to obtain a lock that was not released by the CopyManager.  I recommend using the CopyManager.copyIn() method that returns a CopyIn object, rather than using the convenience method that takes a reader.  Use the writeToCopy() to pump the data in, and be sure to catch SQLException.  If you get an SQLException, call cancelCopy() and retry or whatever your recovery scenario is, otherwise call endCopy().  I would have expected PostgreSQL to handle the severing of a Connection in the middle of a bulk copy better, but that is probably a question for the PostgreSQL group."

Of course I already tried it and nothing changed so I'm left wondering here... Any help welcomed ! Thanks

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Ludwig Adam
Дата:
Сообщение: Re: Trace JDBC connection to Java Thread / local socket port
Следующее
От: javadesigner
Дата:
Сообщение: PreparedStatement error upon trying to set a '?' after interval keyword