如何解决Aerospike错误,目前不允许操作?

问题描述 投票:0回答:1

我正在使用Aerospike 4.8v并将数据持久存储在磁盘上,并且正在向Aerospike发出并行写入请求,如果我发出10个并行请求,那么它可以正常工作,但是当我发出100个并行请求时,它给出了错误,即,此操作不允许时间,使用代码22。我认为aerospike必须能够并行处理数百或数千个请求,但我不知道出了什么问题,因此,如果有人可以指导,那将是有帮助的。

错误日志:

 error : { AerospikeError: Operation not allowed at this time.
    at Function.fromASError (/data/codebase/lib/node_modules/aerospike/lib/error.js:113:21)
    at QueryCommand.convertError (/data/codebase/lib/node_modules/aerospike/lib/commands/command.js:91:27)
    at QueryCommand.convertResponse (/data/codebase/lib/node_modules/aerospike/lib/commands/command.js:101:24)
    at asCallback (/data/codebase/lib/node_modules/aerospike/lib/commands/command.js:163:24)
  name: 'AerospikeError',
  code: 22,
  command:
   QueryCommand {
     client:
      Client {
        domain: null,
        _events: {},
        _eventsCount: 0,
        _maxListeners: undefined,
        config: [Object],
        as_client: AerospikeClient {},
        connected: true,
        captureStackTraces: false },
     args: [ 'antiSpamming', 'userTargetingMatrix', [Object], undefined ],
     captureStackTraces: false,
     key: undefined,
     ensureConnected: true,
     stream:
      RecordStream {
        aborted: false,
        client: [Object],
        _events: [Object],
        _eventsCount: 3 } },
  func: 'as_query_parse_records_async',
  file: 'src/main/aerospike/aerospike_query.c',
  line: 246,
  inDoubt: false }

警告日志:

Jan 28 06:03:25 ip-1-0-4-78 asd[32437]: Jan 28 2020 06:03:25 GMT: WARNING (scan): (scan_manager.c:103) at scan threads limit - can't start new scan
Jan 28 06:03:25 ip-1-0-4-78 asd[32437]: Jan 28 2020 06:03:25 GMT: WARNING (scan): (scan.c:676) basic scan job 5614303283813349397 failed to start (22)

aerospike aerospike-ce
1个回答
0
投票

您很可能超出了与查询有关的默认限制。首先,请参见error code 22的定义:

对于使用服务器4.7或更高版本的扫描,没有可用的线程(已达到scan-threads-limit。)>

基于您的scan-threads-limit,您正在执行扫描,而不是使用other question进行query。您需要按照“其他信息”中的建议增加该限制。但是,就CPU而言,您的系统相当薄弱,因此您应该调整该值和基准,比较具有相同工作负载之前和之后的性能。在实际的生产系统中,您将有多个节点,可能需要两个以上的CPU内核,并根据需要类似地调整扫描线程。

© www.soinside.com 2019 - 2024. All rights reserved.