-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Too many connections error #555
Comments
We are using v3.0.0.rc.3 |
Haven't seen this but definitely upgrade to the latest version. We improved the way connections are handled a while ago, it might help. |
Actually, I can see from that log that you're using neo4j-core 3.0.1 with net http persistent, which is the change to connection handling. I'd still update the gem first, all bets are off with the rc. |
Good to know. The RC felt good enough to use :) I'll do the update. As a side, we also found Neo4J was configured to not use as much memory as it should have been. In fact, is there a good resource on tuning Neo4j for production environments? |
The RCs were all stable and I think some folks did put some little things The Neo website has a big section on performance tuning that covers memory On Thursday, November 6, 2014, Matt Snyder [email protected] wrote:
|
Did you have any luck with this? |
@subvertallchris Upgrading the gem seems to have resolved this. As well as adjusting the Neo4j configuration |
Great! Enjoy! |
@subvertallchris Question. If I use Also, how well does ha-cluster work with v3.0? |
A unique constraint also acts as an exact index, so you only need to specify the one. Keep in mind that if you change an index into a constraint within an existing database, you'll need to drop the old index from the web console. As for clustering... not well, since it doesn't differentiate between read/write queries. Nothing on that linked page applies to the 3.0 release of the gem at all. I started a branch to provide HA support to the gem, even tried to have it ready for the 3.0 release, but didn't have enough time or a good test environment. Ultimately decided to focus on other features until someone requested it. So... is this something you'd say you need? |
When adding a new index or constraint, does the existing data need to be We are running an HA cluster in Production. So I'd say yes :) As a side note, I'd love to pitch in on this repo wherever there is need. So far you guys have been rocking it, but if I can lend a hand I will. |
Nope, the data doesn't need to be touched, Neo4j handles it for you for the new index is created. If you could help out with the HA stuff, that would be awesome. Honestly, the biggest thing I was lacking was a good test environment and someone who could actually run it through its paces. If you want, hop over to neo4jrb/neo4j-core#96. I'm going to post the process of how I'm expecting it to work and the questions I still have. |
Oh yeah, one other thing. If you're using JRuby and Neo4j Embedded, I think there is good support for High Availability. I know that Volker made some changes in the past month or two that added this. |
@subvertallchris So even after upgrading the gems, this popped back up It's not consistent and I'm having trouble associating it with any changes in load or number of queries |
This seems to be a sort-of-well-known net-http-persistent bug. It's discussed at length at sparklemotion/mechanize#123, maybe something in there can help you pin it down. If you can't get it pinned down there, I hate to say this but I think you should open an issue at https://github.com/drbrain/net-http-persistent. I'm happy to help with troubleshooting but without being able to reproduce, I think it'd be best for you to lead the charge. |
In that thread, see the comment from mislav that starts with "I was bitten by the same issue as" |
👍 |
This issue is almost a year old and three versions behind. I'm going to close it, but please comment / reopen if you're still having trouble with 5.x or the 6.x alpha |
I am using version 6.1 of Neo4jrb and ruby 2.1.8 and I get the same error when, for example, trying to create a node ('GraphQuantity.create(....)'):
|
We've had reports of serious performance issues with Ruby 2.1. Can you On Thursday, January 21, 2016, Achilleas [email protected] wrote:
|
@subvertallchris Yes I figured that would be an issue. In theorie we could upgrade, but seeing as we'd integrate neo4j in a pretty big existing project it would take some more work to do so. I was hoping this issue would've been fixed for 2.1.x. No such luck I guess? ;) |
Unfortunately not. All signs indicated it being an issue in a dependency, On Thursday, January 21, 2016, Achilleas [email protected] wrote:
|
That is unlucky for me :(. |
Interesting. What's the query that you're trying to execute? Also, can you tell me a bit about your environment? Is the server local and what OS are you running? |
And no, if 2.2.2 isn't behaving then I don't expect 2.3.x will. |
Haha yes you are probably right. I am running The query:
My model:
|
Seems straightforward enough. How many nodes are you expecting to have returned from the db? |
Right now there are 0 in the database. I created a new one just to play around with. |
Ah, I see. In your code or even in the Rails console, one time, try calling |
Sadly that doesn't work either:
|
That is really weird... Is the Neo4j web console working? On Thursday, January 21, 2016, Achilleas [email protected] wrote:
|
Yes both the web console and the neo4j-shell are working fine. I just created a node and it works. |
Do you have auth enabled on the Neo4j server? Has it ever worked in the You can also try going through
If that works, we might be able to troubleshoot something more specific. On Thursday, January 21, 2016, Achilleas [email protected] wrote:
|
I have an other (older) project that I generated with Neo4j from the get go that works fine with neo4j 5.2.7, so it is either an issue with the version or a conflict with another gem. I have auth enabled so I ran:
|
The conflicting gem seems unlikely come to think of it because I ran the above in a 'clean' pry. |
I think there is a bug somewhere in the sample query I gave you or the code A little background for you: Neo4j-core is a dependency of Neo4j, it Can you also make sure you are using the most recent patch release of the On Thursday, January 21, 2016, Achilleas <[email protected]
|
I have this version in my Gemfile: |
I just ran the query you told me earlier and now it looks like it worked:
|
When I run the above in my rails console I get an error again:
So it seems like a conflicting gem or configuration. What do you think? |
Ok so I disabled a whole lot of gems and now it works. Time to trial-and-error the gems one by one ;) I will keep you updated. Thanks a lot so far for your time and patience 👍 |
It seems I have found the culprit:
When I comment this out and rebundle neo4jrb works again :). I will try updating it and I will try the other ruby versions as well to check it they work without/the updated newrelic. |
Works with Neo4jrb :) Now for Ruby 2.1.x ;). |
"The original ruby version I tried using ( Was what I had written until I noticed that running |
That's really interesting, please keep us posted! |
Awesome debugging, thanks! Hopefully this will help somebody else who comes along! |
Good morning guys :). Welcome @cheerfulstoic thanks for joining in. Apparently newrelic wasn't really it, I created a screencapture showing what is going on now: Apparently the connection is very unreliable. I will try with Ruby 2.3, but first I will check if running neo4j in a Docker container is more stable than using the Update: Running in Docker does not fix anything. So I will update ruby once again. Update 2: Using Ruby 2.3 does not improve things and I already had newrelic disabled. I will start disabling gems again to see if they give us any issues. I also updated OS X to 10.11.3 (latest), but that hasn't changed anything ;). |
Ok so I believe I really solved it this time ;). The flickering threw me off and made me think it was newrelic. Now I disabled the gem If it turns out Fakeweb is the issue here I will open an issue over there to see if Thilo and Wes can fix it. |
@cheerfulstoic The real question is why fakeweb was in de :development group in the Gemfile. There is no real issue with using fakeweb in tests. Also, it seems we don't use it anymore anyway, so I can remove the gem. Still makes for some 'wasted' hours of debugging though ;). |
So I have been working with Neo4jrb all day and I haven't had any problems with the connection since I removed 'fakeweb' from the Gemfile. My issue is solved, even in Ruby 2.1. Thanks @subvertallchris @cheerfulstoic :) I will point the guys from Fakeweb over to here. |
Not sure I'd hold my breath on a response. That gem hasn't been updated for a few years. :-( |
Maybe my issue will spark some sudden inspiration to work on it again ;) :) |
I'm seeing this error when using the neo4j gem to talk to our Neo4j cluster. It literally just started. Do we need to tune our cluster settings? Have you seen this before? The CPU and memory load on the servers in nominal.
The text was updated successfully, but these errors were encountered: