I just started to discover the world of Neo4j and stumbled right into an issue, I have problems to grasp.
I installed Neo4j and started it via bin/neo4j start.
In the next steps I wrote a ruby script that creates new nodes, after installing jruby and the neo4j gem. Everything fine until here.
How to get started is decribed here:
http://wiki.neo4j.org/content/Getting_Started_With_Ruby
My Problem: When the server is started and I try to creates nodes, Neo4j responds that the database is locked. When I stop the server the nodes get created.
I am used to relational databases, so I donĀ“t understand this behaviour.
When I check the Server Info via the Neo4j Webadmin Tool (http://localhost:7474/webadmin) the ReadOnly flag is set to false.
It seems to me that the Neo4j approach is maybe different from relational db, meaning the server could maybe have a slightly other purpose then a db server.
Thanks for any advices,
Tobias
The JRuby bindings will start it's own Neo4j instance, meaning that you will end up having two database instances trying to use the same files.
The approach is somewhat different, but relational databases use it as well, for example Apache Derby. As with Neo4j, you can either embed it in your application (that is what the JRuby bindings are doing in your case) or run it as a standalone server.
So just don't start a server yourself, that should solve the problem.
Related
I recently set up a Ubuntu Linux instance in Oracle Cloud. I'm used to take snapshots of VM's so I can roll back if something later goes wrong. In Digitalocean (droplet) this is as simple as pressing a button but in Oracle Cloud I can't seem to find this functionality. I've read documentation and Googled but to no avail. Also seems Oracle have several different cloud offerings with similar naming which makes it hard to find relevant information.
Go to boot volume and create a full backup. This will help you to restore your server to the last good configuration.
I have a project that I'm working on, in which I have found myself facing quite an interesting debacle that I'm not sure which is the most efficient way to solve. I have this Spring Application that is randomly pulling some data from a PostgreSQL database and sending it to clients. On the other hand, I have a gitlab repo in which multiple individuals are submitting data which is manually entered every once in a while into the Postgres DB for the aforementioned purpose. What would be the best way to automate this?
Cheers
I have a meteor app running on heroku and until last week the database was running on mlab.
Then I switched to MongoDB Atlas and after a few days the application was running very slow.
I upgraded from M2 to M5, so it was ok, but now it is very slow again.
It seems there is a network out limitation, but with mlab there wasn't.
Could it be a problem with the queries or what am I doing wrong, what do I have to consider?
Does anybody know about this issue or have experience with meteor/heroku/mongodb-atlas combination?
Thanks in advance
In Heroku, when you picked up the MLab service, the DB was provided most probably in the same VPC with your Meteor instance. I'd first make sure I run an Atlas MongoDB in the same region and service provider as Heroku. (e.g. both Meteor and Mongo run on AWS eu-central). Did you do this? https://www.mongodb.com/blog/post/integrating-mongodb-atlas-with-heroku-private-spaces
Do you exceed the limitations for your Mongo cluster? https://docs.atlas.mongodb.com/reference/atlas-limits/ This is important to avoid paying for a service scale that you don't need.
Monti APM (https://montiapm.com/) has a free monitoring service for Meteor for 8 hours retention. That can help you with understanding your Oplog transactions and volume.
I don't know how you set up your Oplog but you may also try this (older) Mongo URI. I still use this with the latest Meteor version and I am fine with it:
"env": {
"MONGO_URL": "mongodb://yourapp:XXXXXXXXXXXXXXXX#yourapp-shard-00-00-zc1lg.mongodb.net:27017,yourapp-shard-00-01-zc1lg.mongodb.net:27017,yourapp-shard-00-02-zc1lg.mongodb.net:27017/meteor?ssl=true&replicaSet=yourapp-shard-0&authSource=admin",
"MONGO_OPLOG_URL": "mongodb://yourapp-oplog:XXXXXXXXXXXXXXXX#yourapp-shard-00-00-zc1lg.mongodb.net:27017,yourapp-shard-00-01-zc1lg.mongodb.net:27017,yourapp-shard-00-02-zc1lg.mongodb.net:27017/local?authSource=admin&ssl=true&replicaSet=Yourapp-shard-0"
}
I have provisioned postgres on my heroku app and also installed postgres locally to maintain parity (as the documentation recommends) with the online database but I'm also not understanding how this will work. Am I supposed to be accessing a local copy of a database when running on my own computer (while building and before deploying) and then using heroku's separate postgres database once it is deployed? If it is parity, shouldn't they both be using the heroku postgres database?
In other words, will my local app (during production) and heroku app (deployed and live) be using the same online postgres database?
Thanks.
Am I supposed to be accessing a local copy of a database when running on my own computer (while building and before deploying) and then using heroku's separate postgres database once it is deployed?
Yes, that's exactly it. Without seeing what bit of documentation you're referencing it's hard to say what they mean but perhaps there's another way to explain it.
In your local development environment, you may find that you need to test database schema changes (this is just one example, there are many). If you only had the one heroku postgres database you'd be forced to test these changes in production, which might result in poor usability for your users and that doesn't even account for the possibility of making a mistake and accidentally destroying your production data. There are a number of other shortcomings and challenges with this single database configuration.
For these reasons and more, it's best to keep your production data completely separated from your development/staging/test environment by creating a local/staging database. You might reasonably ask, "What about the data? I need data to test!". There are many ways to put together your test database and which you choose will likely depend on your needs. A shortlist of possibilities:
Use a seed file to generate mock data in your db
Use a model factory (usually runs in conjunction with your testing framework)
Take a dump of your production database, anonymize and redact sensitive information and use that for local testing.
I am going through the getting started guide with heroku and I hit a snag, cannot seem to access the remote database it connects but there is no database name. I have installed postgres sql 9.5 locally but attempting to push the local database I created fails also and when i run heroku pg:info it never responds.
I am going through the documentation but there is a lot of it, so hopefully some psql wizard will see this and go, oh this is what he is doing wrong and let me know.
It's likely that you have not "Created" the database. rake db:create - This needs to be done on Heroku's servers and your local machine.
Not quite correct,I am not using ruby, one major caveat I did not notice initially is that I was not in the bash shell which might have been part of my problem, what i wound up doing was connecting to the postgresql remote instance from my local install using pgadmin and creating the table manually from there. I had to get the connection info which I obtained by using heroku pg:credentials DATABASE which gave me the info I needed to add the server in pgadmin, you do need to check ssl for that within the tool, and it helps to add the database name to restricted so you see only your database, not the whole 10 gazillion they have in production :) I hope this helps anyone else that has the same problem.
Thanks