Don’t Symlink Indices in ElasticSearch!

Posted by in IT

The other day I’ve been trying to improve the downtime when updating an index in elasticsearch (ES) and I’ve decided the best approach would be to create a new index and do a symlink to the active one, keeping the valid index. so, my structure would be:

Note: this is likely not a best practice :)

This would allow me to build an index with other means, and only do a stop/change link/restart cycle which would be much quicker :) This is simplified, of course, but you get the idea.

Unfortunately, we found out that ES gets confused and times out (red status). OUCH! After removing the symlink, ES was back to its old self.

Lesson learned: Creating symlinks to indices in the indices directory is bad for you! If you have one, remove it immediately :)


A little experiment: If you find this post and ad below useful, please check the ad out :-)