123solar stopped after reboot

Talks about solar stuff
andy
Posts: 43
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: 123solar stopped after reboot

Post by andy » Wed May 16, 2018 10:48 am

jeanmarc wrote:
Wed May 16, 2018 8:30 am
I don't get it.. Why do you want to restart each 15min 123s by night ? :shock:
What systemctl status 123solar1 say ?

Code: Select all

systemctl status 123solar1
● 123solar1.service - 123Solar1
   Loaded: loaded (/etc/systemd/system/123solar1.service; disabled; vendor preset: disabled)
   Active: inactive (dead) since Wed 2018-05-16 04:45:03 EEST; 7h ago
  Process: 498 ExecStart=/usr/bin/curl http://localhost/123solar/scripts/boot123s.php (code=exited, status=0/SUCCESS)
 Main PID: 498 (code=exited, status=0/SUCCESS)

тра 16 04:45:02 pi systemd[1]: Started 123Solar1.
тра 16 04:45:02 pi curl[498]:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
тра 16 04:45:02 pi curl[498]:                                  Dload  Upload   Total   Spent    Left  Speed
тра 16 04:45:03 pi curl[498]: [316B blob data]
I made this script to make sure that 123 is started
in logs (events.tx invt1)

Code: Select all

#* 16/05/2018 04:45:03	123Solar awake

#* 16/05/2018 04:45:02	Starting 123Solar on boot debug (503)

#* 16/05/2018 04:30:02	Starting 123Solar on boot debug (484)

#* 16/05/2018 04:15:02	Starting 123Solar on boot debug (468)

#* 16/05/2018 04:00:02	Starting 123Solar on boot debug (451)

#* 16/05/2018 03:45:01	Starting 123Solar on boot debug (437)

#* 16/05/2018 03:30:01	Starting 123Solar on boot debug (419)

#* 16/05/2018 03:15:01	Starting 123Solar on boot debug (403)

#* 16/05/2018 03:00:01	Starting 123Solar on boot debug (382)

#* 16/05/2018 02:45:01	Starting 123Solar on boot debug (364)

#* 16/05/2018 02:30:01	Starting 123Solar on boot debug (344)

#* 16/05/2018 02:15:01	Starting 123Solar on boot debug (290)

#* 16/05/2018 02:00:01	Starting 123Solar on boot debug (269)

#* 16/05/2018 01:50:09	Starting 123Solar on boot debug (260)

#* 16/05/2018 01:45:08	Starting 123Solar on boot debug (11433)

#* 16/05/2018 01:30:08	Starting 123Solar on boot debug (11411)

#* 16/05/2018 01:15:08	Starting 123Solar on boot debug (11396)

#* 16/05/2018 01:00:07	Starting 123Solar on boot debug (11380)

#* 16/05/2018 00:45:07	Starting 123Solar on boot debug (11360)

#* 16/05/2018 00:30:07	Starting 123Solar on boot debug (11347)

#* 16/05/2018 00:15:07	Starting 123Solar on boot debug (11328)

#* 16/05/2018 00:00:07	Starting 123Solar on boot debug (11311)

#* 15/05/2018 20:29:00	123Solar asleep
from 0-00 to 4-45 start from my script(123solar1.service) - every 15min
04-45-03 solar awake (from script 123solar.service)

BUT WHY when I open web interface at 7-20am - 123solar is STOPPED????

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

Re: 123solar stopped after reboot

Post by jeanmarc » Wed May 16, 2018 12:03 pm

Maybe check if 123s is started with the good process id :
more scripts/123solar.pid
then ps -ef | grep 123solar.php

andy
Posts: 43
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: 123solar stopped after reboot

Post by andy » Wed May 16, 2018 1:37 pm

when I open terminal at 7-00 today
process 123solar.php not running

right now 123solar.php and 123solar.pid have same id

andy
Posts: 43
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: 123solar stopped after reboot

Post by andy » Wed May 16, 2018 1:50 pm

my nginx error log
per hour increased by 15MB

Code: Select all

 *22361 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined offset: 2 in /srv/http/123solar/programs/programday.php on line 158
about 300 lines in log

and

Code: Select all

*951 FastCGI sent in stderr: "n /srv/http/123solar/programs/programlastdays.php on line 34 PHP message: PHP Notice:  Undefined offset: -408 in /srv/http/123solar/programs/programlastdays.php on line 34
about 600 lines in log (offset from -1 to -650)

andy
Posts: 43
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: 123solar stopped after reboot

Post by andy » Thu May 17, 2018 7:13 am

today 123solar NOT WORKING

Code: Select all

more scripts/123solar.pid
266

Code: Select all

 ps -ef | grep 123solar.php
root       871   806  0 08:36 pts/0    00:00:00 grep 123solar.php
csv file from inverter4 for today it was created but it is empty
сsv file from inverter1 for today it was not created

123solar.err

Code: Select all

#* 17/05/2018 01:15:01	Starting 123Solar on boot debug (12799)

Xdebug requires Zend Engine API version 320160303.
The Zend Engine API version 320170718 which is installed, is newer.
Contact Derick Rethans at http://xdebug.org/docs/faq#api for a later version of Xdebug.

#* 17/05/2018 01:30:01	Starting 123Solar on boot debug (12834)

Xdebug requires Zend Engine API version 320160303.
The Zend Engine API version 320170718 which is installed, is newer.
Contact Derick Rethans at http://xdebug.org/docs/faq#api for a later version of Xdebug.

#* 17/05/2018 01:45:01	Starting 123Solar on boot debug (12860)

Xdebug requires Zend Engine API version 320160303.
The Zend Engine API version 320170718 which is installed, is newer.
Contact Derick Rethans at http://xdebug.org/docs/faq#api for a later version of Xdebug.

#* 17/05/2018 01:50:03	Starting 123Solar on boot debug (266)

Xdebug requires Zend Engine API version 320160303.
The Zend Engine API version 320170718 which is installed, is newer.
Contact Derick Rethans at http://xdebug.org/docs/faq#api for a later version of Xdebug.

[b]PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted [/b](tried to allocate 50331656 bytes) in /srv/http/123solar/scripts/123solar.php on line 278 
it seems that the script is launched and immediately closed with an error
there can be an error in that that the size of a file (infos/events.txt) more 55MB?

but why if I run the script in the morning, does it work all day without errors?

andy
Posts: 43
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: 123solar stopped after reboot

Post by andy » Thu May 17, 2018 7:25 am

I just ran the script through the web interface

Code: Select all

more scripts/123solar.pid
1048

Code: Select all

ps -ef | grep 123solar.php
http      1048     1  1 09:22 ?        00:00:00 php ../scripts/123solar.php
root      1091   806  0 09:23 pts/0    00:00:00 grep 123solar.php
can I turn off xdebug extension in php.ini ?

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

Re: 123solar stopped after reboot

Post by jeanmarc » Thu May 17, 2018 9:40 am

Hi,
Yes you can disable xdebug.
The problem is indeed related to /infos/events.txt. How come it reached 55MB ? :o
You could remove it to solve the issue.

andy
Posts: 43
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: 123solar stopped after reboot

Post by andy » Thu May 17, 2018 11:42 am

OK. Thanks
debug disabled, file events.txt removed, debug off

see what happens tomorrow morning

andy
Posts: 43
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: 123solar stopped after reboot

Post by andy » Fri May 18, 2018 6:25 am

All working fine!
Thanks jeanmarc.

But bug in 123solar must be fixed.
If file events.txt >40MB php script terminated

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

Re: 123solar stopped after reboot

Post by jeanmarc » Fri May 18, 2018 3:58 pm

I'd put a limit but how come you reached 55MB file, that's huge !?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest