I'm assuming this is a full install and not nano. Putting aside the issue of a possible memory leak, you generally make swap permanent by adding it to /etc/fstab. Something like:
#/dev/label/swap0 none swap sw 0 0
Ref. https://www.freebsd.org/doc/handbook/adding-swap-space.html
To increase the size of the swap you will need to repartition the disk or create a "swap file" (see link above) and add it to fstab as above.
But… I don't think that's the problem. You should not be running out of RAM (and IMHO not even swapping at all). Other than the ICAP errors, what are you seeing that leads you to suspect the memory? Are there memory related errors in Status: System logs: General? (i.e. out of swap space, memory exhausted, unable to create, etc.) In your situation, I'd recommend looking for the source of the ICAP errors first.