amphp / amphp/process

main process exited, code=killed, status=9/KILL

Open
#76 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
260
Forks
29
PR merge metrics
No merged PRs in 30d

Description

hi
i create a service with php 8.2 on centos 7 64 bit

PHP 8.2.20 (cli) (built: Jun  4 2024 13:22:51) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.2.20, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.20, Copyright (c), by Zend Technologies

but after some minute or some hour my service stop and i have no error or log to find what happend only main process exited, code=killed, status=9/KILL

i add some memory log and only see

 Memory: 4.00MB / Peak: 4.00MB
<?php
ignore_user_abort(true);
@set_time_limit(0);
error_reporting(E_ALL);
ini_set('display_errors', '1');
ini_set('memory_limit', '-1');
@session_write_close();
gc_enable();
use Revolt\EventLoop;
use function Amp\async;
use function Amp\Future\await;
use Amp\Process\Process;
use function Amp\delay;
try {
    Revolt\EventLoop::setDriver(new Revolt\EventLoop\Driver\EvDriver());
  //  Revolt\EventLoop::setDriver(new Revolt\EventLoop\Driver\UvDriver());
   // Revolt\EventLoop::setDriver(new Revolt\EventLoop\Driver\EventDriver());
} catch (Throwable $e) {
    PrintLog($e->getMessage());//Class "EventBase" not found
}


try{
    Revolt\EventLoop::run();
} catch (Throwable $e) {
    PrintLog("Unhandled exception in EventLoop: " . $e->getMessage());
    PrintLog("File: " . $e->getFile() . ' on line ' . $e->getLine());
    PrintLog("Trace: " . $e->getTraceAsString());
}

in main function i have this

            Amp\async(function () use ($args , $atomicrunningCoroutines,$atomicSendingCoroutines, $pm_pid) {
                try {
                PrintLog( 'add ' . $pm_pid );
                $context = Amp\Parallel\Context\contextFactory()->start(__DIR__ . '/child/sms_send_select.php');
                $context->send($args);

please help me to find what cause exit main process

i check ```
[root@nginx2 davari]# ulimit -n # soft limit (open files)
1024000
[root@nginx2 davari]# ulimit -Hn # hard limit
1024000

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the service configuration and the PHP entry points shown in the report, especially Revolt\EventLoop::run() and the Amp\Parallel context startup. Check the service and system logs for the source of status 9/KILL, then determine whether the failure is reproducible and document the cause and any relevant diagnostic guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, php
Domain
backend, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.