Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Paul Baker
@paulbaker3
Since reactions are user generated content like a thumbs up on a Facebook post.
Heinrich Klobuczek
@klobuczek
That sounds somewhat in line with the allocation sizes you mentioned earlier.
Ben Campbell
@Meatballs___twitter
I've been puzzling through some weird results in the neo4j-ruby-driver and I think I found the issue, although I'm kinda stuck as I cant really seem to see the final cause: neo4jrb/neo4j-ruby-driver#51
Heinrich Klobuczek
@klobuczek
@Meatballs___twitter could you switch to jRuby and neo4j-java-driver gem (identical API) to see if you get the same issue?
Heinrich Klobuczek
@klobuczek
I would like to see a simple case without movie db and apoc
I always try to reduce the data and query to find the breaking point on minimal sample
Ben Campbell
@Meatballs___twitter
Yep seems to be the same with standard cypher query so should be able to put something together in a minute
Ben Campbell
@Meatballs___twitter
Posted one up @klobuczek seems to do the same on simple test case
Heinrich Klobuczek
@klobuczek
Thank you. Will look into this right now.
Stephen Betts
@thisisstephenbetts
Hi there, I'm trying to migrate from Neo4j 3.6.x to Neo4j 4.0.6, within an existing Rails app. I'm using activegraph-4.0.1. I've had some success connecting to the database, following some of the bug reports in here, but now I'm getting one which I hadn't seen before: Neo4j::Driver::Exceptions::SessionExpiredException: code: `fff`, error: `4`, state: `4`, error_context: `plain_socket_send(/tmp/seabolt-20201020-8099-19eti4h/seabolt-1.7.4/src/seabolt/src/bolt/communication-plain.c:231), send error code: 32`
Heinrich Klobuczek
@klobuczek
on what method call? Stack?
Stephen Betts
@thisisstephenbetts
This happens when I try to do a basic query using ActiveGraph.query, or run the inbuilt neo4jrb rake commands like Rake::Task['neo4j:migrate']
/Users/stephenbetts/.gem/ruby/2.6.3/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/error_handling.rb:90:in `throw' /Users/stephenbetts/.gem/ruby/2.6.3/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/error_handling.rb:95:in `unqualified_error' /Users/stephenbetts/.gem/ruby/2.6.3/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/error_handling.rb:39:in `check_error' /Users/stephenbetts/.gem/ruby/2.6.3/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/async/direct_connection.rb:40:in `flush' /Users/stephenbetts/.gem/ruby/2.6.3/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/async/direct_connection.rb:52:in `commit' /Users/stephenbetts/.gem/ruby/2.6.3/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/messaging/v3/bolt_protocol_v3.rb:29:in `tap' /Users/stephenbetts/.gem/ruby/2.6.3/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/messaging/v3/bolt_protocol_v3.rb:29:in `commit_transaction' /Users/stephenbetts/.gem/ruby/2.6.3/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/explicit_transaction.rb:92:in `do_commit' /Users/stephenbetts/.gem/ruby/2.6.3/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/explicit_transaction.rb:77:in `commit' /Users/stephenbetts/.gem/ruby/2.6.3/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/explicit_transaction.rb:48:in `close' /Users/stephenbetts/.gem/ruby/2.6.3/gems/activegraph-10.0.1/lib/active_graph/transaction.rb:10:in `close' /Users/stephenbetts/.gem/ruby/2.6.3/gems/neo4j-ruby-driver-1.7.2/lib/neo4j/driver/auto_closable.rb:21:in `block (3 levels) in with_block_definer' /Users/stephenbetts/.gem/ruby/2.6.3/gems/activegraph-10.0.1/lib/active_graph/transactions.rb:43:in `run_transaction_work' /Users/stephenbetts/.gem/ruby/2.6.3/gems/activegraph-10.0.1/lib/active_graph/transactions.rb:38:in `block in send_transaction' /Users/stephenbetts/.gem/ruby/2.6.3/gems/neo4j-ruby-driver-1.7.2/lib/neo4j/driver/auto_closable.rb:19:in `block (3 levels) in with_block_definer' /Users/stephenbetts/.gem/ruby/2.6.3/gems/activegraph-10.0.1/lib/active_graph/transactions.rb:37:in `send_transaction' /Users/stephenbetts/.gem/ruby/2.6.3/gems/activegraph-10.0.1/lib/active_graph/transactions.rb:21:in `transaction' /Users/stephenbetts/.gem/ruby/2.6.3/gems/activegraph-10.0.1/lib/active_graph/base.rb:33:in `query' /Users/stephenbetts/WiP/nypl/subject-headings-explorer-poc/lib/shep/neo4j_csv_processor.rb:31:in `write_model_version' /Users/stephenbetts/WiP/nypl/subject-headings-explorer-poc/lib/tasks/graph.rake:56:in `block (2 levels) in <main>' /Users/stephenbetts/WiP/nypl/subject-headings-explorer-poc/lib/tasks/graph.rake:85:in `block (2 levels) in <main>' /Users/stephenbetts/.gem/ruby/2.6.3/bin/bundle:23:in `load' /Users/stephenbetts/.gem/ruby/2.6.3/bin/bundle:23:in `<main>' Tasks: TOP => graph:reset_load_csv => graph:reset_csv (See full trace by running task with --trace)
That's the one for the query
Thanks very much for the help!
MATCH queries seem okay — but CREATE queries cause errors
This message was deleted

That's not true — it's the MATCH query it fails on:

ActiveGraph::Base.query("MATCH (n:ModelVersion) DELETE n")

Heinrich Klobuczek
@klobuczek
that’s a write query after all
can you run any query?
have you configured encryption: false?
Stephen Betts
@thisisstephenbetts
Oh you're right — sorry
I have configured that. Was getting an error before I did that, and found that fix in here
Just checking on a read query
Stephen Betts
@thisisstephenbetts
Modified to this ActiveGraph::Base.query("MATCH (n:ModelVersion) RETURN n") and get the same error
Heinrich Klobuczek
@klobuczek
can you query with neo4j browser?
Stephen Betts
@thisisstephenbetts
Yup
No error message; response is (no changes, no records) which is as expected
Both MATCH (n:ModelVersion) DELETE n and MATCH (n:ModelVersion) RETURN n seemed to work just fine
though did nothing
Heinrich Klobuczek
@klobuczek
is it easy for you to switch to jruby just for testing? If so then replace the neo4j-ruby-driver with neo4j-java-driver gem.
the other driver is likely to have better error messages
Stephen Betts
@thisisstephenbetts
I won't be able to do that tonight. I'll give it a go and check back in.
In the meantime, do you know what the error parameters there imply? No problem if not, just interested
Thanks for looking into this — we appreciate it!
Heinrich Klobuczek
@klobuczek
This an error from the socket library we don’t know how to interpret. I bet this is something simple with the server set up and not intuitivelly related to the error message.
What scheme are you using? neo4j, bolt?
Stephen Betts
@thisisstephenbetts
I was using bolt. Will try with neo4j, and after that jruby
No change at all in switching to neo4j scheme
Stephen Betts
@thisisstephenbetts
Okay, despite my first impressions, jruby has the same problem:
`` Neo4j::Driver::Exceptions::SessionExpiredException: code:fff, error:4, state:4, error_context:plain_socket_send(/tmp/seabolt-20201020-8099-19eti4h/seabolt-1.7.4/src/seabolt/src/bolt/communication-plain.c:231), send error code: 32/Users/stephenbetts/.gem/jruby/2.5.7/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/error_handling.rb:90:inthrow'
/Users/stephenbetts/.gem/jruby/2.5.7/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/error_handling.rb:95:in unqualified_error' /Users/stephenbetts/.gem/jruby/2.5.7/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/error_handling.rb:39:incheck_error'
/Users/stephenbetts/.gem/jruby/2.5.7/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/async/direct_connection.rb:40:in flush' /Users/stephenbetts/.gem/jruby/2.5.7/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/async/direct_connection.rb:52:incommit'
/Users/stephenbetts/.gem/jruby/2.5.7/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/messaging/v3/bolt_protocol_v3.rb:29:in commit_transaction' /Users/stephenbetts/.gem/jruby/2.5.7/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/explicit_transaction.rb:92:indo_commit'
/Users/stephenbetts/.gem/jruby/2.5.7/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/explicit_transaction.rb:77:in commit' /Users/stephenbetts/.gem/jruby/2.5.7/gems/neo4j-ruby-driver-1.7.2/ffi/neo4j/driver/internal/explicit_transaction.rb:48:inclose'
/Users/stephenbetts/.gem/jruby/2.5.7/gems/activegraph-10.0.1/lib/active_graph/transaction.rb:10:in close' /Users/stephenbetts/.gem/jruby/2.5.7/gems/neo4j-ruby-driver-1.7.2/lib/neo4j/driver/auto_closable.rb:21:inblock in begin_transaction'
/Users/stephenbetts/.gem/jruby/2.5.7/gems/activegraph-10.0.1/lib/active_graph/transactions.rb:43:in run_transaction_work' /Users/stephenbetts/.gem/jruby/2.5.7/gems/activegraph-10.0.1/lib/active_graph/transactions.rb:38:inblock in send_transaction'
/Users/stephenbetts/.gem/jruby/2.5.7/gems/neo4j-ruby-driver-1.7.2/lib/neo4j/driver/auto_closable.rb:19:in block in session' /Users/stephenbetts/.gem/jruby/2.5.7/gems/activegraph-10.0.1/lib/active_graph/transactions.rb:37:insend_transaction'
/Users/stephenbetts/.gem/jruby/2.5.7/gems/activegraph-10.0.1/lib/active_graph/transactions.rb:21:in transaction' /Users/stephenbetts/.gem/jruby/2.5.7/gems/activegraph-10.0.1/lib/active_graph/base.rb:33:inquery'
`` /Users/stephenbetts/WiP/nypl/subject-headings-explorer-poc/lib/shep/neo4j_csv_processor.rb:31:inwrite_model_version'
/Users/stephenbetts/WiP/nypl/subject-headings-explorer-poc/lib/tasks/graph.rake:55:in block in <main>' /Users/stephenbetts/WiP/nypl/subject-headings-explorer-poc/lib/tasks/graph.rake:86:inblock in <main>'
/Users/stephenbetts/.gem/jruby/2.5.7/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in kernel_load' /Users/stephenbetts/.gem/jruby/2.5.7/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:inrun'
/Users/stephenbetts/.gem/jruby/2.5.7/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in exec' /Users/stephenbetts/.gem/jruby/2.5.7/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:inrun'
/Users/stephenbetts/.gem/jruby/2.5.7/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' /Users/stephenbetts/.gem/jruby/2.5.7/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:indispatch'
/Users/stephenbetts/.gem/jruby/2.5.7/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in dispatch' /Users/stephenbetts/.gem/jruby/2.5.7/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:instart'
/Users/stephenbetts/.gem/jruby/2.5.7/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in start' /Users/stephenbetts/.gem/jruby/2.5.7/gems/bundler-2.1.4/exe/bundle:46:inblock in <main>'
/Users/stephenbetts/.gem/jruby/2.5.7/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in with_friendly_errors' /Users/stephenbetts/.gem/jruby/2.5.7/gems/bundler-2.1.4/exe/bundle:34:in<main>'
/Users/stephenbetts/.gem/jruby/2.5.7/bin/bundle:23:in `<main>'
Tasks: TOP => graph:reset_load_csv => graph:reset_csv
(See full trace by running task with --trace)
Heinrich Klobuczek
@klobuczek
I meant jruby with neo4j-java-driver gem
Replace neo4j-ruby-driver with neo4j-java-driver in your Gemfile
Stephen Betts
@thisisstephenbetts
Ah sorry, I thought I must be missing something
Stephen Betts
@thisisstephenbetts
Still trying to get the neo4j-java-driver driver working, but in the meantime I have a theory. The rake task I'm working on stops and starts the local test neo4j server. I wonder if the connection that ActiveGraph::Base.query uses has expired. Is there a way to reconnect (in the old neo4jrb I was establishing the connection directly with Neo4j::Core::CypherSession.new with the suitable adaptor — that seems different now)
dimitriwoei
@dimitriwoei

Hi, I'm in the process of transitioning to ActiveGraph. I have the following piece of code that needs to be converted:

q = ::Neo4j::Core::Query.new(session: ::Neo4j::ActiveBase.current_session)

I tried using:

q = ::ActiveGraph::Base.query

But I'm getting the following error:

Traceback (most recent call last):
        2: from (irb):13
        1: from (irb):14:in `rescue in irb_binding'
ArgumentError (Could not determine query from arguments: [])

Please advise

Heinrich Klobuczek
@klobuczek
@thisisstephenbetts the driver uses a conection pool and automatically replaces stale connections.
@dimitriwoei I would need to see how q is used.
Heinrich Klobuczek
@klobuczek
otherwise the code corresponds to ActiveGraph::Base.new_query or ActiveGraph::Core::Query.new (without parameters)
dimitriwoei
@dimitriwoei

Thank you. I'm using it for among other things:

q.call("db.index.fulltext.queryNodes('#{Item.fullTextIndex}', '*bla*') \nYIELD node")

and

additional_query_list.each { |additional_query|
   q=q.send(additional_query)
}
q.proxy_as(my_class, :n)