W
W
WotanWeb2020-04-29 07:56:59
linux
WotanWeb, 2020-04-29 07:56:59

Why is php daemon shutting down on linux?

Good afternoon!
Can you please tell me why a php daemon can die, launched from the terminal with the following command:
php -f patch/to/autoapdate_daemon.php &

It works for several hours, but then it crashes.

Tried nohup php -f patch/to/autoapdate_daemon.php & - similar.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Ilya, 2020-04-29
@WotanWeb

It can do all its work and just end, an unhandled exception may occur, it may fall by the limit. Lots of options

C
chupasaurus, 2020-04-29
@chupasaurus

Telepaths are quarantined in bunkers, and no one will help you without logs.

O
Oyc, 2020-04-29
@Oyc

I don't know anything about PHP (yes, yes, I exist), but in your place, I would start this process in screen

apt-get update
apt-get install screen
screen -R php
php -f patch/to/autoapdate_daemon.php

Then disconnect ,, wait until it falls off and see what happens by connecting again to the process screen: screen -r php. It is unlikely that he dies silently there. I think some kind of mistake happens - there are not enough rights somewhere, not enough space, etc.

V
Vitaly Karasik, 2020-04-29
@vitaly_il1

These are not demons.

Please tell me why the php daemon can die, launched from the terminal with the following command:
php -f patch/to/autoapdate_daemon.php &

the process will die when you close the terminal
nohup php -f patch/to/autoapdate_daemon.php &

better, but also not quite.
Two aspects:
1) why it dies - see the logs. If not visible, raise the log level
2) how to keep the process always running - check systemd, or other options from the answer https://superuser.com/questions/683325/how-to-moni...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question