4 days of upgrading db (to v1.5.0) ending in out ot memory

Oh! There was a database bug in some old version (potentially around 1.3.4) with large databases on 32 bit specifically. (That combo is not the most common.) It has those symptoms. Potentially you could repair it on a machine with more RAM, but otherwise you’re better off dropping it and rescanning from start if possible.

Ah, this was it: Many small LDB files with database tuning