-1

we are using gulp in laravel to minify our views, the problem we are facing, server is unable to process gulp due to low ram of 512, is there any way we can minify the html on our local machine and then push it to our server?

1 Answers1

0

I think you should solve this by making a swap space on your server.

Swap files increase the amount of virtual memory available to perform tasks like for example gulp.

Linux divides its physical RAM (random access memory) into chunks of memory called pages. Swapping is the process whereby a page of memory is copied to the preconfigured space on the hard disk, called swap space, to free up that page of memory. The combined sizes of the physical memory and the swap space is the amount of virtual memory available.

from: https://wiki.archlinux.org/index.php/swap

Depending on what your server setup looks like you can find many guides on how to enable swap for your particular server.

Assuming you have Linux you can check if your server has any swap space allocated by running:

sudo swapon --show

and also

free -h

To create a swapfile you allocate it by:

sudo fallocate -l 1G /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

Which will give you a swap file of 1 GB.

You then have to secure the swap and configure swappiness etc for performance and this depends on your system.

henrik
  • 1,558
  • 3
  • 14
  • 29