Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7993911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:59:37+00:00 2026-06-04T13:59:37+00:00

I’m working with a quite big Neo4J setup with more than 60,000 nodes. Each

  • 0

I’m working with a quite big Neo4J setup with more than 60,000 nodes. Each node has about 4~5 properties and a simple parent->child relationship. When working with those 60,000 nodes, specially in queries that are expensive and repetitive, i’m getting various 500 HTTP errors through Neo4J’s REST interface.

After going through the logs, i found that Java heap space was the problem. I cranked up the 512 MB limit to 2048 MB but it’s still giving me 500. If i set the heap to something like 3GB or 4GB, neo4j doesn’t even start. I’m testing this on a quite good laptop (i5, 4GB RAM) and i really want to know if this is a configuration problem or if the application will perform ok on my server (an Amazon Extra-Large High-CPU instance). Is there some sort of caching that can help me get things faster? Basically, i’m iterating over the entire network of nodes multiple times.

I’m running two queries. The first is:

start referrer=node(3) match path=referrer-[*1..1]->referral return referral

Which is done to discover the nodes which are Tier 1 for the Referrer #3. Then, i have to discover all nodes from all his tiers, returning the node, nodes from the first tier and then the tier number.

start referrer=node(3) match path=referrer-[*1..1]->firsttier-[*0..]->referral return referral, firsttier, length(path)

It works perfectly and it’s quite fast. However, i’m doing this for ALL the nodes in my network. I’m running both queries (and applying business logic with them) inside a for loop. The loop runs 60,000 times.

Right now i’m testing this on my laptop, however, this “task” has been prepared for distributed processing, since i made everything with ZeroMQ. The for loop sends messages to workers and workers make the queries.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:59:39+00:00Added an answer on June 4, 2026 at 1:59 pm

    60,000 nodes is small for Neo4j — it can go up to 32 billion+ — but you need to increase the heap size in the config.

    See http://blog.neo4j.org/2011/03/neo4j-13-abisko-lampa-m04-size-really.html

    However, you probably want to limit the number of nodes you return over REST and page them.

    Or you might consider returning all the IDs, caching them in your app or something like Redis, and then doing a multi-get with Cypher on the IDs. This way you aren’t running the query every time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the
I'm working with an upstream system that sometimes sends me text destined for HTML/XML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.