question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Randomly getting AEROSPIKE_ERR_TIMEOUT

See original GitHub issue
Unhandled rejection AerospikeError: AEROSPIKE_ERR_TIMEOUT
    at Function.AerospikeError.fromASError (/home/eduard/node_modules/aerospike/lib/aerospike_error.js:113:10)
    at Client.DefaultCallbackHandler [as callbackHandler] (/home/eduard/node_modules/aerospike/lib/client.js:71:72)
    at putCb (/home/eduard/node_modules/aerospike/lib/client.js:1247:10)
Unhandled rejection AerospikeError: AEROSPIKE_ERR_TIMEOUT
    at Function.AerospikeError.fromASError (/home/eduard/node_modules/aerospike/lib/aerospike_error.js:113:10)
    at Client.DefaultCallbackHandler [as callbackHandler] (/home/eduard/node_modules/aerospike/lib/client.js:71:72)
    at putCb (/home/eduard/node_modules/aerospike/lib/client.js:1247:10)
Unhandled rejection AerospikeError: AEROSPIKE_ERR_TIMEOUT
    at Function.AerospikeError.fromASError (/home/eduard/node_modules/aerospike/lib/aerospike_error.js:113:10)
    at Client.DefaultCallbackHandler [as callbackHandler] (/home/eduard/node_modules/aerospike/lib/client.js:71:72)
    at /home/eduard/node_modules/aerospike/lib/client.js:836:10

I get about 560 of the first error message at once, sometimes. Here’s my config:

Aerospike.client({
    hosts: [{
        addr: '127.0.0.1',
        port: 3000
    }],
    log: {
        level: Aerospike.log.WARN
    },
    policies: {
        timeout: 5000
    },
    maxConnsPerNode: 1024
})
namespace live {
    replication-factor 2
    memory-size 500M
    storage-engine device {
        file /home/eduard/db/db.dat
        filesize 2G
        data-in-memory true
        post-write-queue 1
    }
}

DB and client are on the same machine (server 3.9.0.3, node client 2.3.1). I can provide more information if needed. Is there anything I can do to fix these timeouts?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:22 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
jheckingcommented, Oct 10, 2017

Closing this issue.

While not a direct fix for this issue, client release v3 has improved timeout & retry handling. The new BasePolicy class has two separate socketTimeout and totalTimeout policy values; while the former is the socket idle timeout value for the network connection to the server, the latter is the total timeout value for the entire database operation. If totalTimeout > socketTimeout the client will automatically retry the operation up to maxRetries times.

1reaction
jheckingcommented, Aug 23, 2016

The stack traces for errors raised in async operation callbacks are unfortunately not very useful. I’d like to add support for better stack traces at least in debug/development mode similar to how e.g. the redis client does it. But you can’t do that in production since it comes with a pretty significant performance penalty. What is clear from the stack traces is that the timeouts happen in both put and get operations.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Aerospike keeps getting client timeout error - Stack Overflow
This means that the default host ('localhost') is probably not where your server is running. If it's on a different IP than 127.0.0.1, ......
Read more >
Write record exception:AerospikeException$Timeout
I am trouble with a problem for writing record Just one record is ok while writing. The exception. com.aerospike.client.
Read more >
ClientPolicy (aerospike-client 6.1.5 API) - javadoc.io
Cluster close timeout in milliseconds. Time to wait for pending async commands to complete when AerospikeClient.close() is called. If close() is called from...
Read more >
Client Class — Aerospike documentation - Read the Docs
It also gets the partition map of the cluster, which is how it knows where ... If you see the error “-10, 'Failed...
Read more >
Basic error handling in spring-data-aerospike - Medium
Basic error handling in spring-data-aerospike ... Some of these errors are transient, meaning there are random ... Get the Medium app.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found