The following error may occur when too many packets received once upon a time.
"rv = -1. errno: 105. No buffer space available
while ((rv = recv(g_nfq_fd, buf, sizeof(buf), 0)) && rv >= 0) {
//log_debugv("pkt received");
nfq_handle_packet(g_nfq_h, buf, rv);
}
log_debug("rv = %d. errno: %d. %s", rv, errno, strerror(errno));
It looks like it might be worth trying to increase the buffer size of the netlink socket
From https://www.netfilter.org/documentation/FAQ/netfilter-faq-4.html
these are standard Netlink sockets, and you can tune their receive buffer sizes via /proc/sys/net/core, >sysctl, or use the SO_RCVBUF socket option on the file descriptor.