Problem with memory

Tonight my HASS stopped to work and in the log the last line says:

OSError: [Errno 12] Cannot allocate memory

What to do in such cases? Which could be the cause? Is it needed a reboot of the raspberry?