using bolt_sips before db_connection v2
chungwong opened this issue · 8 comments
as ecto v2 requries db_connection: ~> 1.1
, what commit should I use to avoid upgrading ecto to v3?
I am using bolt_sips 0.4.12 and experience an error in production. Neo4j worked for a few hours and threw
ERROR [o.n.b.t.SocketTransportHandler] Fatal error occurred when handling a client connection: unable to create new native thread unable to create new native thread java.lang.OutOfMemoryError: unable to create new native thread
I am wondering if the latest commits would fix this problem.
you can use {:bolt_sips, "~> 0.4.12"}
, from Hex.pm, if you are using db_connection 1.x.
Regarding the error, that's not one thrown by the Elixir driver; it is a Java exception, as you most probably realized by now, but I am just clarifying this for the users here not familiar with Java (if any?! ;)
I am already using {:bolt_sips, "~> 0.4.12"}
and I believe it is the same issue as #41
For each Bolt.Sips.query
, it opens a port and never close it. And although I can be wrong, each port on the client is holding a thread on the server as well.
I was monitoring the number of threads neo4j created.
With 0.4.12
ps -Tp neo4j_process_id | wc
the number of threads increase to ~4.9k because each Bolt.Sips.query
would never release the port/thread.
After using commit e80616f,
ps -Tp neo4j_process_id | wc
remains constant
Sorry, I meant the -rc version: {:bolt_sips, "~> 1.0.0-rc2"}
At the time of that issue, the master was following the dev branch of db_connection 2. The current bol_sipe release candidate is using the rc version of DBConnection. HTH
using {:bolt_sips, "~> 1.0.0-rc2"}
requires upgrading Ecto to V3
Failed to use "db_connection" because
bolt_sips (version 1.0.0-rc2) requires ~> 2.0.0-rc.0
ecto (version 2.2.10) requires ~> 1.1
For people like myself uses bolt_sips and cannot upgrade to Ecto 3 at this moment, it seems 1.0.0-rc2 is not an option but e80616f
Sorry :/
Is that commit workig, in your case?
It is working, at least in my use case. Didn't see any error caused by db_connection
.
Thanks :)
Cool, thank you.