Yes, increasing RAM / Buffer size could solve this problem.
We can also use
Generally mysqldump uses --quick option by default. --quick option will retrieve data from table one by one rather than loading the entire data from large table and buffer it in memory before dumping it. This could cause excessive memory usage. You can use --skip-quick option if you want skip this option.