News for hackers. Stuff that matters.
Re:What Postgres Full Text Search Is Missing by wordofx on Tuesday August 06, 2024 @02:47PM (#41173931)
ES is just unreliable. Can be running smoothly for a year and boom it falls over and you’re left scratching your head.
Re:What Postgres Full Text Search Is Missing by cyberes on Tuesday August 06, 2024 @03:28PM (#41174346)
That exact scenario just happened to me a few days ago.
Re:What Postgres Full Text Search Is Missing by agumonkey on Tuesday August 06, 2024 @03:44PM (#41174519)
What would you consider as replacement
Re:What Postgres Full Text Search Is Missing by alexpeng on Tuesday August 06, 2024 @05:21PM (#41175526)
SingleStore is pretty good at ES use cases. Low latency, scalability, real time ingest, full text search + millisecond query times.
Re:What Postgres Full Text Search Is Missing by agumonkey on Wednesday August 07, 2024 @03:27AM (#41179020)
Thanks a lot
Re:What Postgres Full Text Search Is Missing by papadany on Thursday August 08, 2024 @03:06AM (#41188861)
Yes, SingleStore seems to be really good.
Re:What Postgres Full Text Search Is Missing by whartung on Tuesday August 06, 2024 @06:20PM (#41176033)
How did you fix it? What happened?
Re:What Postgres Full Text Search Is Missing by fizx on Tuesday August 06, 2024 @08:11PM (#41176916)
A problem here is that ES (and Solr too) are pathological with respect to garbage collection.

To make generational GC efficient, you want to have very short lived objects, or objects that live forever. Lots of moderately long-lived objects is the worst case scenario, as it causes permanent fragmentation of the old GC generation.

Lucene generally churns through a lot of strings while indexing, but it also builds a lot of caches that live on-heap for a few minutes. Because the minor GCs come fast and furious due to indexing, that means you have caches that last just long enough to get evicted into the old generation, only to become useless shortly thereafter.

The end result looks like a slow burning memory leak. I've seen the worst cases take down servers every hour or two, but this can accumulate over time on a slower fuse as well.

Re:What Postgres Full Text Search Is Missing by nickpsecurity on Tuesday August 06, 2024 @09:25PM (#41177336)
Can this be fixed with alternative GC’s or tuning?
Re:What Postgres Full Text Search Is Missing by fizx on Wednesday August 07, 2024 @12:05AM (#41178145)
It might be better by now with the newer GC options (ZGC, G1, Azul). For a while those had their own problems, but I'm a little out of the loop.

Tuning the older options wasn't really all that beneficial. We tried tuning, then running a custom build of OpenJDK to mess with the survivor space (which isn't that tunable via config), then ultimately settled on more aggressive (i.e. weekly) rolling restarts of servers.

Re:What Postgres Full Text Search Is Missing by mannyv on Tuesday August 06, 2024 @09:52PM (#41177495)
This seems to be a Lucene/SOLR problem. I used Lucene/SOLR years ago, and it died so often that we just auto-indexed nightly and had a re-index button in the UI.
Re:What Postgres Full Text Search Is Missing by jillesvangurp on Wednesday August 07, 2024 @02:13AM (#41178679)
I've been using and supporting ES (and OS lately) for well over a decade. Mostly its fine but a lot of users struggle with sizing their clusters properly (which is costly). Elasticsearch falling over is what happens when you don't do that. It scales fine until it doesn't and then you hit a brick wall and things get ugly.

Additionally, many companies learn the hard way that dynamic mapping is a bad idea because you might end up with hundreds of fields and a lot of memory overhead and garbage collection. I've fixed more than a few situations like this for clients that ended up with hundreds or thousands of fields, many shards and indices. Usually it's because they are just dumping a lot of data in there without thinking about how to optimize that for what they need.

A properly architected setup is not going to fall over randomly. But you need to know what you are doing and there are a lot of clients that I help that clearly don't have the in house expertise to do this properly and are a bit out of their depth.