Closed neeraj20gupta closed 7 years ago
I think the sentence "Cluster timeout...." is the key here. Might be ES 5? I think this tool has some issues with it, PRs are welcomed :)
I am running it on ES 2.4. Also its a single node cluster Below is the command
python elasticsearch-stress-test.py --es_address 127.0.0.1 --indices 10 --documents 10 --clients 1 --seconds 300 --number-of-shards 1 --number-of-replicas 0 --bulk-size 5000 --max-fields-per-document 10 --max-size-per-field 50 --no-cleanup --stats-frequency 15
Just making sure, running
curl 127.0.0.1:9200
works?
Yes. Below is the output
{
"name" : "Mark Todd",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "UKU0_X6_RB2uiMTicqo_sA",
"version" : {
"number" : "2.4.1",
"build_hash" : "c67dc32e24162035d18d6fe1e952c4cbcbe79d16",
"build_timestamp" : "2016-09-27T18:57:55Z",
"build_snapshot" : false,
"lucene_version" : "5.5.2"
},
"tagline" : "You Know, for Search"
}
Can you try to add some prints around the timeout exception?
The problem I had was that line 373: map(lambda thread: thread.start(), clients) wasn't starting the threads (Ubuntu 16:04). Replaced with
for d in clients:
d.start()
And it works. I have other issues but probably that's due to ES5.
Sorry company policy doesn't allow me to do changes to open source code and feed it back.
Too bad to hear :) If you can paste here a summary of the needed changes when you get it to work - would be great.
Only changes were to increase the maxsize to 25 and timeout to 30s for the elasticsearch library. Otherwise I got lots of timeouts all the time. Added extra stats for myself (documents/s etc) also as that's what i'm primarily interested in.
Yep :) Thanks!
Thanks :)
Sample o/p on script run
Starting initialization of 127.0.0.1 Done! Creating indices.. Cluster timeout.... Cleaning up created indices.. Starting the test. Will print stats every 15 seconds. The test would run for 300 seconds, but it might take a bit more because we are waiting for current bulk operation to complete.
Test is done! Final results: Elapsed time: 10 seconds Successful bulks: 0 (0 documents) Failed bulks: 0 (0 documents) Indexed approximately 0 MB which is 0.00 MB/s