jeanmarc77 / 123solar

123Solar is a lightweight set of PHP/JS files that makes a web logger to monitor your photovoltaic inverter(s). It just need a web server and PHP, no databases are even needed. The philosophy is: To keep it simple, fast, with a low foot print to run on cheap and low powered devices.
GNU General Public License v3.0
36 stars 12 forks source link

high load on raspberry #49

Closed basti122303 closed 1 year ago

basti122303 commented 1 year ago

Hello, I run 123solar on a raspberry 2 Mod. B with nginx and php-fpm.

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
634 www-data 20 0 7768 5900 4748 S 18.1 0.6 0:09.89 nginx

In the nginx log I every secound somethink like: [09/Jun/2023:11:30:01 +0200] "GET /solar/programs/programlive.php?invtnum=1 HTTP/1.0"

Why does it poll so often? what is it for? and how can i do it more efficient?

Best regards

jeanmarc77 commented 1 year ago

To show 'live' data you need to retrieve them.. If you don't show 123s pages, there is no programlive requests

basti122303 commented 1 year ago

Thanks for the fast answer. Where can I set the interval? Whats about websockets to do this?

jeanmarc77 commented 1 year ago

line 387 I won't change the index behavior, you can set pooling in dashboard. If you find a better way to improve perf, tell me how

jeanmarc77 commented 1 year ago

also set access_log off; in nginx.conf will improve your system perf