Fixed the ElasticSearchPersistWriter

Why only sleep 1ms?  you are going to spend a lot of CPU time in your wait 

Also, why are you incrementing the timeoutthreshold?