Skip to content
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

求教出错:The rest server is too busy to write #256

Closed
baibingzhi opened this issue Dec 4, 2018 · 2 comments
Labels

Comments

@baibingzhi
Copy link

@baibingzhi baibingzhi commented Dec 4, 2018

多线访问 hugegraphServer 时,当并发量大于一定程度会导致server繁忙报错,错误如下:
com.baidu.hugegraph.HugeException: The rest server is too busy to write

请问如何配置可以延长 hugegraphServer 的超时时间(或者增大连接池数量),而非快速地给出失败响应,谢谢!

@baibingzhi baibingzhi changed the title 求教: 求教出错:The rest server is too busy to write Dec 5, 2018
@Linary

This comment has been minimized.

Copy link
Contributor

@Linary Linary commented Dec 5, 2018

  • 修改(如果没有则增加) rest-server.propertiesbatch.max_write_ratio=90,这个配置项表示机器有多大比例的线程用于批量写数据,默认值是 50(0-100之间),相当于比例为 0.5,那线程数就是CPU个数 * 2 * 0.5。
  • 除了修改比例,也可以直接指定写线程数,在 rest-server.properties 中添加 batch.max_write_threads=xxx。如果这两个配置都写了,batch.max_write_threads会生效。
  • 请问你是使用什么工具或组件访问的HugeGraphServer,如果是通过了HugeClient,那在new HugeClient时可以指定第三个参数(tiemout),默认20秒。如果是Loader,可以通过--timeout指定该参数,在Loader中默认60秒。
@baibingzhi

This comment has been minimized.

Copy link
Author

@baibingzhi baibingzhi commented Dec 5, 2018

@Linary 现在是使用的HugeClient访问的HugeGraphServer。
非常感谢,20秒的超时应该是够了,增大write_thread数量就没有报错了。

@Linary Linary added the question label Dec 6, 2018
@Linary Linary closed this Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.