Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Aerospike Error: (9) Client timeout: timeout=1000 iterations=1 failedNodes=0 failedConns=0

Im new to Aerospike...!

when im trying to insert an record into database it show an timeout error like...

aql> INSERT INTO test.student (pk, emp_id, name, age) VALUES ('k003', 'BP003', 'Sai', 25)
Error: (9) Client timeout: timeout=1000 iterations=1 failedNodes=0 failedConns=0

and one more thing....

I turn off my wifi and then run the same command at that time it didn't show the error and the command is successfully runs.

aql> INSERT INTO test.student (pk, emp_id, name, age) VALUES ('k003', 'BP003', 'Sai', 25)
OK, 1 record affected.

so what this means...?

can anyone help me out of this.....!

like image 445
Nani Avatar asked Dec 08 '22 01:12

Nani


2 Answers

Something was wrong with your network, and since you're not mentioning anything about where your client is (where AQL is running) and where your server is, it's impossible to tell. Obviously if the client can't get to the server the operation cannot happen. If both are localhost you may have some odd configuration where your wifi was trying to look for 127.0.0.1 on the internet and once you disconnected from it the client was able to reach to the server locally...not enough details to know.

Just make sure your clients can see your server node. Simplest is to try to telnet <host> 3000 (assuming the default port 3000).

Regarding timeouts (in general) AQL type help and you'll get (among other things):

SETTINGS
    TIMEOUT                       (time in ms, default: 1000)
    RECORD_TTL                    (time in sec, default: 0)
    RECORD_PRINT_METADATA         (true | false, default false)
    VERBOSE                       (true | false, default false)
    ECHO                          (true | false, default true)
    FAIL_ON_CLUSTER_CHANGE        (true | false, default true, policy applies to scans)
    OUTPUT                        (TABLE | JSON, default TABLE)
    LUA_USERPATH                  <path>, default : /opt/aerospike/usr/udf/lua
    LUA_SYSPATH                   <path>, default : /opt/aerospike/sys/udf/lua
    USE_SMD                       (true | false, default false)
    REPLICA_ANY                   (true | false, default false)

    To get the value of a setting, run:

        aql> GET <setting>

    To set the value of a setting, run:

        aql> SET <setting> <value>

So, SET TIMEOUT 2500, for example.

like image 40
Ronen Botzer Avatar answered Dec 10 '22 14:12

Ronen Botzer


It means you should increase timeout parameter. Depending how far you are from the database, 1 sec may be not enough.

like image 103
yatskovsky Avatar answered Dec 10 '22 13:12

yatskovsky