You can explicitly set the mx limit to a higher value or remove it then it’ll use the default which depends on RAM (I think for a 2GB ARM machine it’s 512m).
Beware, however, that I haven’t yet seen a system that really needs that much heap.
So if you keep hitting a 320m or even higher limit, it’s likely you have a mem leak.
Increasing the limit further will then buy you some more time but it is not a solution in that case.