STAN on multiple cores occasionally crashing Linux without overwhelming memory

Ok thanks. Lets first check whether the issue is at the stan level or brms level.

In order to do that, you have to make the stancode and standata and run cmdstanr separately. You can use make_stancode (see How to convert "standata" to "json"? to see a snippet on how to qucikly transform the data for cmdstanr).

If that still crashes then its something weird going on in the Stan core, otherwise its something that happens after Stan runs.