Voltronic Infinisolar 10k hybrid support

others protocols
mstuetz
Posts: 94
Joined: Sun Dec 29, 2013 1:20 pm

Re: 123solar 1.8

Post by mstuetz » Thu May 23, 2019 1:36 pm

No, just checked it. My scripts do not consume any memory, even when called by 123solar.
Due the reason, I have two similar inversters running, I simply copied the protocol and renamed the files to infini10k_1.php and infini10k_2.php (infini10k_x_checks.php/infini10k_x_startup.php).
Could this naming of my scripts lead to a problem?

jeanmarc
Posts: 1764
Joined: Thu Aug 29, 2013 7:16 am

Re: Voltronic Infinisolar 10k hybrid support

Post by jeanmarc » Thu May 23, 2019 1:51 pm

No that could not be the problem. Did you also change $script_name in your protocol files ?
Maybe try 1 inverter alone and check if it continue to grow.

mstuetz
Posts: 94
Joined: Sun Dec 29, 2013 1:20 pm

Re: Voltronic Infinisolar 10k hybrid support

Post by mstuetz » Thu May 23, 2019 2:58 pm

No, I corrected the script names this before.
At the start and end of each protocol file I included a syslog message with function "memory_get_usage".
This is my output:

Code: Select all

May 23 15:29:01 testsolar infini10k_2.php[23851]: infini10k_2.php Mem Usage ende: 44286888
May 23 15:29:01 testsolar infini10k_2.php[23851]: infini10k_1.php Mem Usage start: 44286888
May 23 15:29:01 testsolar infini10k_2.php[23851]: infini10k_1.php Mem Usage ende: 44286888
May 23 15:29:01 testsolar infini10k_2.php[23851]: infini10k_2.php Mem Usage start: 44352424
...
May 23 15:29:18 testsolar infini10k_2.php[23851]: infini10k_2.php Mem Usage start: 44352424
May 23 15:29:18 testsolar infini10k_2.php[23851]: infini10k_2.php Mem Usage ende: 44352424
May 23 15:29:18 testsolar infini10k_2.php[23851]: infini10k_1.php Mem Usage start: 44417960
...
May 23 15:29:35 testsolar infini10k_2.php[23851]: infini10k_2.php Mem Usage ende: 44417960
May 23 15:29:35 testsolar infini10k_2.php[23851]: infini10k_1.php Mem Usage start: 44483496
May 23 15:29:35 testsolar infini10k_2.php[23851]: infini10k_1.php Mem Usage ende: 44483496
As you can see every 17 sec memory consumption increases. sleep timer at the scripts end is set to 1 sec.
Is this normal, that the scripts get called so many times within 1 sec?

Code: Select all

May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_2.php Mem Usage start: 44352424
May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_2.php Mem Usage ende: 44352424
May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_1.php Mem Usage start: 44352424
May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_1.php Mem Usage ende: 44352424
May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_2.php Mem Usage start: 44352424
May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_2.php Mem Usage ende: 44352424
May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_1.php Mem Usage start: 44352424
May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_1.php Mem Usage ende: 44352424
May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_2.php Mem Usage start: 44352424
May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_2.php Mem Usage ende: 44352424
May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_1.php Mem Usage start: 44352424
May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_1.php Mem Usage ende: 44352424
May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_2.php Mem Usage start: 44352424
May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_2.php Mem Usage ende: 44352424
May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_1.php Mem Usage start: 44352424
May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_1.php Mem Usage ende: 44352424
May 23 15:29:04 testsolar infini10k_2.php[23851]: infini10k_2.php Mem Usage start: 44352424

jeanmarc
Posts: 1764
Joined: Thu Aug 29, 2013 7:16 am

Re: Voltronic Infinisolar 10k hybrid support

Post by jeanmarc » Thu May 23, 2019 3:42 pm

If it's an infinity loop it should run fast. You put a sleep(50000); delay ?
The problem must lie in your script, i haven't look carefully but make sure you correctly open/close files.

mstuetz
Posts: 94
Joined: Sun Dec 29, 2013 1:20 pm

Re: Voltronic Infinisolar 10k hybrid support

Post by mstuetz » Tue Jun 04, 2019 12:01 pm

Even after changing the usleep(1000000) = 1 sec at the end, code reviews, upgrade to 1.8.3.2 and many hours of diagnosis, the mem leak is still there (~4kB / 11sec).
So I installed the whole bunch on a x86 debian8 machine (PHP5.6). There it is much better with exact same code (I did a diff!).
Then to proof it, I upgraded the x86 machine to debian9 (PHP7.0-33) to have exact same versions as on RPi3 - but no change. After some increasing kB right after program start, stable for many hours.
So it must be some RPi/ARM kernel issue.
No more ideas so far, so I gave up and just restart 123solar twice a day to get rid of this memory consumption issue.

jeanmarc
Posts: 1764
Joined: Thu Aug 29, 2013 7:16 am

Re: Voltronic Infinisolar 10k hybrid support

Post by jeanmarc » Tue Jun 04, 2019 1:11 pm

Wow.. thanks for those tests. Your assumption is the php ARM package or the kernel that leaks ? :geek:
I currently using an x86 (5.0.7-arch1-1-ARCH/PHP 7.3.6) with no trouble.

Code: Select all

top - 14:10:37 up 48 days,  1:31,  1 user,  load average: 1.27, 1.28, 1.30
Tasks:   1 total,   0 running,   1 sleeping,   0 stopped,   0 zombie
%Cpu(s): 16.0 us,  9.8 sy,  0.0 ni, 73.5 id,  0.1 wa,  0.4 hi,  0.3 si,  0.0 st
MiB Mem :   1834.2 total,    167.9 free,    157.3 used,   1509.1 buff/cache
MiB Swap:      0.0 total,      0.0 free,      0.0 used.   1420.3 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 8844 http      20   0  145772  20792 15792 S   0.3   1.1   3:15.16 php

mstuetz
Posts: 94
Joined: Sun Dec 29, 2013 1:20 pm

Re: Voltronic Infinisolar 10k hybrid support

Post by mstuetz » Tue Jun 04, 2019 1:39 pm

Yes. Dunno if RPi3 only - but with actual raspbian (debian 9.9) I can reproduce this problem on 2 machines easily.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest