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

4

5

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.....!

Kurt answered 21/9, 2015 at 12:29 Comment(0)
A
7

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

Austroasiatic answered 21/9, 2015 at 14:49 Comment(3)
how to increase timeout parameter...! @user2784650Kurt
When you start aql, add -T <milliseconds> option. See aerospike.com/docs/tools/aqlAustroasiatic
I will Start aql with aql -T 10000 then also im Getting error Error: (9) Client timeout: timeout=10000 iterations=1 failedNodes=0 failedConns=0 @user2784650Kurt
C
5

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.

Chiro answered 23/9, 2015 at 13:26 Comment(0)
Y
2

Execute the following command in aql:

SET TIMEOUT 3000;
Yowl answered 20/2, 2019 at 15:36 Comment(0)
D
2

Timeout of 1000 ms is quite a big timeout for production server. I would not recommend increasing timeout, instead better investigate what is causing timing issues between client and server.

Damiano answered 23/2, 2019 at 18:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.