Locate the service under /etc/systemd/system and edit it with vim. Add the following to the [Service] section of the file:
LimitNOFILE=65536
This is the equivalent of ulimit -n.
| package com.caffinc.grex.core; | |
| /** | |
| * SPDX-License-Identifier: MIT | |
| * | |
| * Generates Load on the CPU by keeping it busy for the given load percentage | |
| * @author Sriram | |
| */ | |
| public class Load { | |
| /** |
| file, err := os.Open(path) | |
| if err != nil { | |
| return err | |
| } | |
| defer file.Close() | |
| // Only the first 512 bytes are used to sniff the content type. | |
| buffer := make([]byte, 512) | |
| _, err = file.Read(buffer) | |
| if err != nil { |