mysql keeps crashing, how to solve it?

I am using a very simple digitalocean basic server with 512mb RAM, and using Ubuntu 12.04 64bits

I tried the recommendations here:

But still keeps crashing, so I have looked for further information, and this one seems to be a good guide to tweak the server, both apache and mysql:

I think that the key point for me is that I chose Ubuntu 64 bits without being aware that 64 bits Ubuntu takes around 50% more memory than 32 bits

So now I guess the solution is to downgrade to a 32bit server, which will be a bit of a pain… but if this solves the performance issue, then I will surely do it.