reporter
reporter copied to clipboard
127.0.0.1:3000: socket: too many open files
Reporter is not closing connections to the Grafana, after max open files is reached (usually 1024) starts returning Code HTTP 500 Internal Server Error . It means that after 1024 is reporter not usable.
lsof -p
grafana-r 7654 root 5u IPv4 38595998 0t0 TCP localhost:51240->localhost:3000 (ESTABLISHED)
grafana-r 7654 root 6u IPv4 37998345 0t0 TCP localhost:57772->localhost:3000 (ESTABLISHED)
grafana-r 7654 root 7u IPv4 37998346 0t0 TCP localhost:57774->localhost:3000 (ESTABLISHED)
grafana-r 7654 root 8u IPv4 37998347 0t0 TCP localhost:57776->localhost:3000 (ESTABLISHED)
x1024
Reporter output:
http: Accept error: accept tcp [::]:8686: accept4: too many open files; retrying in 1s
Grafana Version: 7.2.2 Reporter GIT version.
- It there any parameter to force closing connection streams after PDF is read?
- Any other workaround (increase max open files does not count)?
Today I have faced the same problem. Temporary added a job to restart reporter service once a day.
Today I have faced the same problem. Temporary added a job to restart reporter service once a day.
how can I restart the reporter?
My solution:Modify the api.go file
First, add the code to import
Then add the following code to the GetDashboard method
Add the same code to the GetPanelPng method
Finally, recompile and install grafana-Reporter
The above is my solution, I am not sure whether it will cause other adverse effects