[0.9.1] Influx returns 500 on "big" insert
This relates to the discussion here: https://groups.google.com/forum/#!topic/influxdb/zZHT8okTcJ0
Inserting 5000 points for the same series in one batch causes Influx to timeout and return 500. It leaves query for data hanging. It seems that this problem doesn't happen when the 5000 points are fro 5000 different series.
Can you
- Look into the problem
- Give indications as to how to get the best write performance out of Influx? Is it better to batch insert points for one measurement per POST (apparently no)? Is there a limit to the amount of points that can be inserted at once? Would it be better to issue concurrent smaller inserts at the same time?
A couple of questions for you:
- Are you specifying timestamps with your data?
- Are the data points sorted by time or are points in the batch out of order?
- Are you using SSDs for disk?
@jwilder yes to all three questions. I ran some more tests and I'm trying to insert around 24000 points in a batch. The batch involves 100 series. The timestamps are explicitly sent and the points are sorted per timestamp.
I also tried sending several parallel writes. Each write was for a certain timestamp for all points. It seemed to work a little better, but eventually the 500s came back.
The nightly build has some additional tuning options you could try changing. These options are not in 0.9.1 though.
[cluster]
shard-writer-timeout = "5s" # The time within which a shard must respond to write.
write-timeout = "5s" # The time within which a write operation must complete on the cluster.
You could try increasing the write-timeout first and then the shard-writer-timeout to see if that helps. A local write that takes more than 5s is odd. Could you run iostat 1 while doing these writes?
I'd suggest using batches around 5-10k. 24000 points should work as well but might be a bit large.
Another idea is to start influx w/ -cpuprofile /tmp/cpu.pprofand profile the writes. If you attach the profile to this issue that might help as well.
New WAL changes plus existing recommendations should address this.