Going from 2018 to 2019.2.6 gives webgl memory error

Hi, we get this error Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 2141519872, (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0
when using 2019.2.6 on project that worked fine in 2018. Some options are missing in the player settings, what to try first? thank you!

In that message the current value is at 2141519872 bytes, or 2042.31 Megabytes. That is unfortunately already at the max size that a WebAssembly heap can take, there is a 2GB limit to memory use. The error message is a bit confusing in this scenario, and in this case means that the build ran out of memory and could not enlarge to more than 2GB due to the browser size cap.

It may be that newer Unity uses slightly more memory and it was already very close to the limit before. Or it could be that there’s a bug that causes new Unity to use considerably much more memory - hard to say up front which exactly.

If this out of memory scenario does not look like something that the project would realistically use that much memory, and it consistently worked on older Unity, I think I’d be interested in taking a look if the project is not ~2GB large on disk and you can send a repro over in a bug report?

I’ve got the same issue on Unity 2019.3
Any fixes or walkaround?