On very large projects, you may see Error: "Out of disk" or Error: "Out of memory" on self-hosted runners when running code scanning. In this case, you may need to increase the memory or disk space available on the runners used for code scanning analysis.
You can review the recommended hardware resources for running CodeQL to make sure your self-hosted runners meet those requirements. For more information, see "Recommended hardware resources for running CodeQL."