The maximum of log files that promtail can tailiing

Hello,

I am monitoring my log files by promtail + loki.
In my system, the log files organized like / var/log/{app}/{date}/{task_id}.log
So the log file numbers increased day by day.
There are more than10,000 log files now.
My promtail crashed after running some hours.

runtime/cgo pthread_create failed resource temporarily unavailable
SIGABRT: abort

Is there suggested maximum of the log files that promtail can tailing?

Thanks

It depends a bit on your system, but it needs to create a thread and a file handle for each file.
Maybe you could drease the number of files that are active and then maybe use file_sd_discovery instead of the static_target config. If the files are only active per day, then ensure you only read the active day.