如何增加资源分配给RavenDB?

huangapple go评论73阅读模式
英文:

How to increase resource allocation to ravendb

问题

我正在尝试处理一个文档,并将许多文档存储到我本地运行的RavenDB中。

我遇到了以下错误:

尝试通过POST http://127.0.0.1:8080/databases/mydb/bulk_docs 向拓扑中的所有配置节点发送ravendb.BatchCommand请求,所有节点似乎都已关闭或未响应。我尝试访问以下节点:http://127.0.0.1:8080
我能够从http://127.0.0.1:8080获取到mydb的拓扑。
获取到的拓扑:(url:http://127.0.0.1:8080,clusterTag:A,serverRole:Member)
退出状态 1

对我来说,听起来可能是我的本地集群在处理我尝试存储的大量数据时计算资源不足。

RavenDB显示我正在使用12个可用核心中的3个,并且我还希望确保它使用了机器上可用的合理数量的内存(我甚至可以为其提供交换空间)。

但是,在网上阅读了一些资料后,我没有找到太多有用的信息来确保RavenDB能够使用所需的资源。我找到了settings.json,因此我可以添加一些配置,理论上应该包含在服务器中,但我没有取得太多进展。

我还找到了一些设置,并将“重新分配核心”更改为12,但它仍然显示正在使用3/12个核心和6/31.1 GB的内存。

如果有其他推荐的解决方案,我愿意倾听。我只需要在本地运行,并且将所有内容存储为JSON无法实现我用例中的快速检索。


更新

我已经成功安装了MongoDB并设置了一个本地数据库。它还没有给我带来任何问题。如果我更好地理解RavenDB,它可能更具吸引力,但我想我会在这个项目中坚持已经经过验证的方法。

英文:

I'm trying to process a document and store many documents into ravendb which I have running locally.

I'm getting the error

Tried to send *ravendb.BatchCommand request via POST http://127.0.0.1:8080/databases/mydb/bulk_docs to all configured nodes in the topology, all of them seem to be down or not responding. I've tried to access the following nodes: http://127.0.0.1:8080
I was able to fetch mydb topology from http://127.0.0.1:8080.
Fetched topology: ( url: http://127.0.0.1:8080, clusterTag: A, serverRole: Member)
exit status 1

To me, it sounds like maybe my local cluster is running out of compute to process the large amount of data I'm trying to store.

RavenDB says I'm using 3 of 12 available cores, and I'd also like to make sure it's using a reasonable amount of the ram I have available on the machine (I'd even be happy with giving it a swap)

But reading around online, I'm not finding much helpful information for making sure RavenDB is able to use what it needs. I found the settings.json so I can add in configurations which theoretically should get included into the server but I'm not making much progress.

I also found some settings and changed "reassign cores" to 12 but it says that still 3/12 are being used and 6/31.1 GB of memory are being used.

If an alternative solution is recommended I'm all ears. I just need to run things locally and storing everything as json's doesn't enable fast enough retrieval for my usecase.


Update

I was able to install mongodb and setup a local database. It hasn't given me any problems yet. RavenDB looks appealing if I understood it better but I guess I'll stick with the tried and true for this project.

答案1

得分: 3

你在服务器上使用3个核心/6GB的资源几乎不可能耗尽,除非你正在处理数亿个文档并进行非常繁重的工作。

服务器上是否出现任何错误?错误信息或服务器日志中应该有更多详细信息。

英文:

It is highly unlikely that you managed to run out of resources on the server with 3 cores / 6 GB unless you are pushing hundreds of millions of documents and doing very heavy work.

Do you get any error on the server? There should be more details on the error or in the server log.

huangapple
  • 本文由 发表于 2021年7月26日 12:24:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/68524490.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定