parallel icon indicating copy to clipboard operation
parallel copied to clipboard

How to launch multiple blocking processes

Open iNilo opened this issue 5 years ago • 68 comments

Terribly sorry for making an issue, but I've been stuck for a while.

I'm in the need to launch multiple blocking php scripts in a concurrent fashion. Its the same script 20 x times.

I've looked at https://github.com/amphp/parallel/blob/master/examples/process.php

and its child:

https://github.com/amphp/parallel/blob/master/examples/blocking-process.php

But I'm struggling to make it launch 20 children ( with different data )

I've got something like this:

$promises = [];
for($x = 0; $x <= 10; $x++)
{
	$process = new Process(__DIR__ . "/amp-runner.php");
	$process->start();
	$promises[] = $process->send(x);
}
$all_replies = Promise\wait(Promise\all($promises));
var_dump($all_replies);

But I can't get it to work.

iNilo avatar Apr 14 '20 21:04 iNilo

What do you mean by "But I can't get it to work." ? What is it doing?

enumag avatar Apr 14 '20 21:04 enumag

As in, I'm seeking advise how actually achieve this.

As for what its doing:

PHP Fatal error:  Uncaught TypeError: Expected one of the following types: Amp\Promise, React\Promise\PromiseInterface; instance of Amp\Parallel\Context\Process given in /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/functions.php:53
Stack trace:
#0 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/functions.php(373): Amp\Internal\createTypeError()
#1 /home/centos/web/public_html/cron/amp-delegator.php(83): Amp\Promise\all()
#2 {main}

So I figured I got to give it a promise, which it will then collect for me. I just can't seem to find the right combination of it all :/

iNilo avatar Apr 14 '20 21:04 iNilo

One of the problems I can see is that $process->start(); also returns a Promise which you don't yield. I recommend you to not use the wait function but instead use Loop::run() yourself and yield the promises (or rather their groups with Promise\all()).

enumag avatar Apr 14 '20 21:04 enumag

Also @kelunik already advised you in https://github.com/amphp/parallel/issues/111 to use amphp/process instead of amphp/parallel. Have you tried that?

enumag avatar Apr 14 '20 21:04 enumag

amphp/process seems to be more for commands like dig, ping, not specifically calling php scripts that are blocking, unless I fully misunderstood that.

iNilo avatar Apr 14 '20 21:04 iNilo

$promises = [];
for($x = 0; $x <= 10; $x++)
{
	$process = new Process(__DIR__ . "/amp-runner.php");
	$promises[] = $process->start();
	$process->send($x);
}
$all_replies = Promise\wait(Promise\all($promises));
var_dump($all_replies);

errors on

PHP Fatal error:  Uncaught Amp\Parallel\Context\StatusError: The process has not been started in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php:249
Stack trace:
#0 /home/centos/web/public_html/cron/amp-delegator.php(71): Amp\Parallel\Context\Process->send()
#1 {main}
  thrown in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 249

iNilo avatar Apr 14 '20 21:04 iNilo

amphp/process is to call anything at all... in fact amphp/parallel is built on top of amphp/process.

enumag avatar Apr 14 '20 22:04 enumag

Now you're not yielding the promises from send method. Also you can't call send before yielding the promise from start. What didn't you understand about "don't use wait"?

enumag avatar Apr 14 '20 22:04 enumag

🥺

Is there any chance you could guide me with (pseudo) code please? I'm not understanding it at all 🤕

  1. for loop 20 times.
  2. start the php child, send it data.
  3. collect the promise (?)
  4. wait for my 20 children to come in. (finally)
  5. process the results ( 1 DB call to reduce strain on the db )

iNilo avatar Apr 14 '20 22:04 iNilo

Ok. Tomorrow. I need to sleep now.

enumag avatar Apr 14 '20 23:04 enumag

function runProcess($value) {
    return call(
        function () {
			$process = new Process(__DIR__ . "/amp-runner.php");
			yield $process->start();
			yield $process->send($x);
        }
    )
}

Loop::run(
    function () {
        $promises = [];
        for($x = 0; $x <= 10; $x++)
        {
            $promises[] = runProcess($x);
        }
        yield $promises;
    }
);

enumag avatar Apr 15 '20 11:04 enumag

Thanks a bunch.

I'm understanding it a bit more, This is my play.php I've setup to test:

<?php
require_once "bootstrap.php";

use Amp\ByteStream;
use Amp\Delayed;
use Amp\Loop;
use Amp\Parallel\Context\Process;
use Amp\Parallel\Worker;
use Amp\Promise;
use function Amp\call;

function runProcess($value)
{
	return call(
		function ()
		{
			global $value;
			$process = new Process(__DIR__ . "/blocking-process.php");
			yield $process->start();
			yield $process->send($value);
		}
	);
}

Loop::run(
	function ()
	{
		$promises = [];
		for($x = 0; $x <= 10; $x++)
		{
			$promises[] = runProcess($x);
		}
		$returns = yield $promises;
		var_dump($returns);
	}
);

this is my blocking-process.php

<?php

// The function returned by this script is run by process.php in a separate process.
// $argc and $argv are available in this process as any other cli PHP script.

use Amp\Parallel\Sync\Channel;

return function (Channel $channel): \Generator {
	$we_are = yield $channel->receive();
	sleep(10);
	yield $channel->send($we_are);
	return $we_are;
};

How would I now get the data from the children?

iNilo avatar Apr 15 '20 12:04 iNilo

@iNilo check this out: https://github.com/JanMikes/php-async-playground i think it is exactly what you are looking for :-)

JanMikes avatar Apr 15 '20 17:04 JanMikes

@iNilo I think @JanMikes provided the answer to your question.

@JanMikes https://github.com/amphp/parallel/issues/112#issuecomment-613971464 might be helpful for you if you don't want to write your own protocol using STDOUT for communication, but rather a message based approach, where the library cares about the serialization.

kelunik avatar Apr 15 '20 18:04 kelunik

Thanks for this @JanMikes & @kelunik It helps me a bit further at understanding the dynamics.

I would just love to get to use the frameworks way of sending things back

https://github.com/amphp/parallel/blob/7f00b8effb4fb439176aba0fa392abd120cbd952/examples/blocking-process.php#L14

And grab it from the child as a parent.

https://github.com/amphp/parallel/blob/7f00b8effb4fb439176aba0fa392abd120cbd952/examples/process.php#L31

A possible last request, to understand the framework better;

Is there possibly any chance someone could write another example based on : https://github.com/amphp/parallel/blob/master/examples/process.php

Use the same blocking process, but launch the child 20 times? ❤️ I really want to understand the sending data towards the child, and reading the data form the children.

iNilo avatar Apr 15 '20 18:04 iNilo

@iNilo You already linked the two relevant lines. What do you want to send / receive exactly? One or multiple messages?

kelunik avatar Apr 15 '20 18:04 kelunik

@kelunik thanks, was stuck for a bit, @JanMikes example used \Amp\Process\Process which has no send function, so I swapped it to Amp\Parallel\Context\Process which finally got it working like it should.

@JanMikes possibly check out my code too.

Thanks for the support all of you ❤️ play.php

<?php
require_once "bootstrap.php";

use Amp\ByteStream;
use Amp\Delayed;
use Amp\Loop;
use Amp\Parallel\Context\Process;
use Amp\Parallel\Worker;
use Amp\Promise;
use function Amp\call;

$results = [];
\Amp\Loop::run(static function() use (&$results) {
	$promises = [];
	for($x = 0; $x <= 10; $x++)
	{
		$promises[] = \Amp\call(function() use (&$results, $x): \Generator
		{
			$process = new Amp\Parallel\Context\Process( __DIR__ . "/blocking-process.php");
			yield $process->start();
			yield $process->send($x);
			$results[] = yield $process->receive();
		});
	}
	// Run all promises at once
	yield \Amp\Promise\all($promises);
});
var_dump($results);

blocking-process.php

<?php

// The function returned by this script is run by process.php in a separate process.
// $argc and $argv are available in this process as any other cli PHP script.

use Amp\Parallel\Sync\Channel;

return function (Channel $channel): \Generator
{
	$we_are = yield $channel->receive();
	sleep(10);
	yield $channel->send(" we were runner $we_are , we just slept for 10 seconds ");
	echo $we_are;
	return $we_are;
};

results:

array(11) {
  [0] =>
  string(49) " we were runner 3 , we just slept for 10 seconds "
  [1] =>
  string(49) " we were runner 2 , we just slept for 10 seconds "
  [2] =>
  string(49) " we were runner 1 , we just slept for 10 seconds "
  [3] =>
  string(49) " we were runner 0 , we just slept for 10 seconds "
  [4] =>
  string(49) " we were runner 8 , we just slept for 10 seconds "
  [5] =>
  string(49) " we were runner 5 , we just slept for 10 seconds "
  [6] =>
  string(50) " we were runner 10 , we just slept for 10 seconds "
  [7] =>
  string(49) " we were runner 9 , we just slept for 10 seconds "
  [8] =>
  string(49) " we were runner 7 , we just slept for 10 seconds "
  [9] =>
  string(49) " we were runner 6 , we just slept for 10 seconds "
  [10] =>
  string(49) " we were runner 4 , we just slept for 10 seconds "
}

iNilo avatar Apr 16 '20 14:04 iNilo

@iNilo looks good to me

@JanMikes #112 (comment) might be helpful for you if you don't want to write your own protocol using STDOUT for communication, but rather a message based approach, where the library cares about the serialization

Process i want to run is symfony/console command that knows nothing about amphp but is capable of writing json results to stdout, thats why i went this way. How would that process receive without amphp data from $process->send($x)? Actually i dont need to send any data to the child process, just run it with correct arguments. What i need is the child to be able to return data to parent (which i thought stdout/stderr is completely fine).

I tried it here: https://github.com/JanMikes/php-async-playground/blob/parallel-context/script.php

If i understand it correctly, if i want to use channel/context to parent-child communication i need that process to be a php script which returns \Generator?

I am sure it could be done other the "amp way", instead of runnng directly symfony/console directly via new Process(['bin/console', 'xx']) i could create child process script with something like this:

<?php

return function(Channel $channel) {
    $container = createSymfonyContainer(); // magic behind ...
    $application = $container->get(Application::class);

    $code = $application->run();

    $service = $container->get(MyService::class);

    yield $channel->send($service->getResults());

    return $code;
};

I dont fully understand what are all added values using channel to communicate instead of taking it directly from stdout and if my thinking is correct, though i like that i dont have to care about serialization/deserialization and just send data to channel.

JanMikes avatar Apr 16 '20 15:04 JanMikes

Whilst slightly offtopic: The second I bump that for loop to 50 times I'm greeted by

PHP Fatal error:  Uncaught Amp\TimeoutException: Operation timed out in /home/centos/web/public_html/cron/vendor/amphp/amp/lib/functions.php:253
Stack trace:
#0 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php(122): Amp\Promise\{closure}()
#1 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(138): Amp\Loop\NativeDriver->dispatch()
#2 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\Loop\Driver->tick()
#3 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php(95): Amp\Loop\Driver->run()
#4 /home/centos/web/public_html/cron/working_example/play.php(29): Amp\Loop::run()
#5 {main}

Next Amp\Parallel\Context\ContextException: Starting the process timed out in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:127
Stack trace:
#0 [internal function]: Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure}()
#1 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php(1 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 202

Was this the reason a delay was introduced in the examples?

iNilo avatar Apr 16 '20 16:04 iNilo

@iNilo Do you have error reporting enabled? Does PHP emit any notices / warnings?

kelunik avatar Apr 16 '20 18:04 kelunik

With xdebug on @kelunik play.php

<?php
require_once "../bootstrap.php";

error_reporting(E_ALL);
ini_set('display_errors', 1);

use Amp\ByteStream;
use Amp\Delayed;
use Amp\Loop;
use Amp\Parallel\Context\Process;
use Amp\Parallel\Worker;
use Amp\Promise;
use function Amp\call;

$results = [];
$endings = [];
\Amp\Loop::run(static function() use (&$results, &$endings) {
	$promises = [];
	for($x = 0; $x <= 50; $x++)
	{
		$promises[] = \Amp\call(function() use (&$results, &$endings, $x): \Generator
		{
			$process = new Amp\Parallel\Context\Process( __DIR__ . "/blocking-process.php");
			yield $process->start();
			yield $process->send($x);
			$results[] = yield $process->receive();
			$endings[] = yield $process->join();
		});
	}
	// Run all promises at once
	yield \Amp\Promise\all($promises);
});
d($results);
d($endings);

php play.php

PHP Fatal error:  Uncaught Amp\TimeoutException: Operation timed out in /home/centos/web/public_html/cron/vendor/amphp/amp/lib/functions.php:253
Stack trace:
#0 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php(122): Amp\Promise\{closure}()
#1 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(138): Amp\Loop\NativeDriver->dispatch()
#2 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\Loop\Driver->tick()
#3 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php(95): Amp\Loop\Driver->run()
#4 /home/centos/web/public_html/cron/working_example/play.php(32): Amp\Loop::run()
#5 {main}

Next Amp\Parallel\Context\ContextException: Starting the process timed out in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:127
Stack trace:
#0 [internal function]: Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure}()
#1 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php(1 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 202

Fatal error: Uncaught Amp\TimeoutException: Operation timed out in /home/centos/web/public_html/cron/vendor/amphp/amp/lib/functions.php:253
Stack trace:
#0 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php(122): Amp\Promise\{closure}()
#1 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(138): Amp\Loop\NativeDriver->dispatch()
#2 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\Loop\Driver->tick()
#3 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php(95): Amp\Loop\Driver->run()
#4 /home/centos/web/public_html/cron/working_example/play.php(32): Amp\Loop::run()
#5 {main}

Next Amp\Parallel\Context\ContextException: Starting the process timed out in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 202

Amp\Parallel\Context\ContextException: Starting the process failed in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 202

Call Stack:
    0.0002     396144   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
    0.0091    1433664   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:32
    0.0093    1444720   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
    6.5128    3468128   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
    6.5128    3461208   5. Amp\Loop\NativeDriver->error() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:133

iNilo avatar Apr 16 '20 20:04 iNilo

If you add yield Amp\delay(0) before line 123 in ProcessHub.php, does that help? If not, how high does the timeout have to be to get it working and no longer time out?

kelunik avatar Apr 16 '20 20:04 kelunik

@kelunik is there any chance I can do this in my play.php ? or do I have to edit the file in my /vendor/ map ?

iNilo avatar Apr 16 '20 20:04 iNilo

You'll need to edit the file in vendor or clone this repository and run your play.php like one of the examples in this repository.

kelunik avatar Apr 16 '20 20:04 kelunik

Understood @kelunik

So I add yield Amp\delay(0) before or after this line? (on my end)

https://github.com/amphp/parallel/blob/2b418eb71d6e82ced042e6bbadb8f81db185a6c5/lib/Context/Internal/ProcessHub.php#L122

Also, is this an issue on my end? (host) or library?

iNilo avatar Apr 16 '20 20:04 iNilo

Editing my play.php did not help :(

require_once "../bootstrap.php";

error_reporting(E_ALL);
ini_set('display_errors', 1);

use Amp\ByteStream;
use Amp\Delayed;
use Amp\Loop;
use Amp\Parallel\Context\Process;
use Amp\Parallel\Worker;
use Amp\Promise;
use function Amp\call;

$results = [];
$endings = [];
\Amp\Loop::run(static function() use (&$results, &$endings) {
	$promises = [];
	for($x = 0; $x <= 50; $x++)
	{
		$promises[] = \Amp\call(function() use (&$results, &$endings, $x): \Generator
		{
			yield Amp\delay(2500);
			$process = new Amp\Parallel\Context\Process( __DIR__ . "/blocking-process.php");
			yield Amp\delay(2500);
			yield $process->start();
			yield Amp\delay(2500);
			yield $process->send($x);
			yield Amp\delay(2500);
			$results[] = yield $process->receive();
			$endings[] = yield $process->join();
		});
	}
	// Run all promises at once
	yield Amp\delay(2500);
	yield \Amp\Promise\all($promises);
});
d($results);
d($endings);
php play.php
PHP Fatal error:  Uncaught Amp\TimeoutException: Operation timed out in /home/centos/web/public_html/cron/vendor/amphp/amp/lib/functions.php:253
Stack trace:
#0 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php(122): Amp\Promise\{closure}()
#1 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(138): Amp\Loop\NativeDriver->dispatch()
#2 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\Loop\Driver->tick()
#3 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php(95): Amp\Loop\Driver->run()
#4 /home/centos/web/public_html/cron/working_example/play.php(37): Amp\Loop::run()
#5 {main}

Next Amp\Parallel\Context\ContextException: Starting the process timed out in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:127
Stack trace:
#0 [internal function]: Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure}()
#1 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php(1 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 202

Fatal error: Uncaught Amp\TimeoutException: Operation timed out in /home/centos/web/public_html/cron/vendor/amphp/amp/lib/functions.php:253
Stack trace:
#0 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php(122): Amp\Promise\{closure}()
#1 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(138): Amp\Loop\NativeDriver->dispatch()
#2 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\Loop\Driver->tick()
#3 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php(95): Amp\Loop\Driver->run()
#4 /home/centos/web/public_html/cron/working_example/play.php(37): Amp\Loop::run()
#5 {main}

Next Amp\Parallel\Context\ContextException: Starting the process timed out in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 202

Amp\Parallel\Context\ContextException: Starting the process failed in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 202

Call Stack:
    0.0002     397784   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
    0.0093    1435304   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
    0.0095    1446360   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
   11.4283    3379664   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72

iNilo avatar Apr 16 '20 20:04 iNilo

Yes, right before the linked line. I'm not sure what's causing the issue, I can't currently reproduce it the same way you're experiencing it.

kelunik avatar Apr 16 '20 21:04 kelunik

@kelunik

When adding a delay at the requested line:

https://github.com/amphp/parallel/blob/2b418eb71d6e82ced042e6bbadb8f81db185a6c5/lib/Context/Internal/ProcessHub.php#L122

So it looks like:

            try {
		yield delay(150);
                $channel = yield Promise\timeout($this->acceptor[$pid]->promise(), self::PROCESS_START_TIMEOUT);
		
            } 

php play.php

PHP Notice:  Undefined offset: 4414 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php on line 124
PHP Stack trace:
PHP   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
PHP   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
PHP   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
PHP   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
PHP   5. Amp\Loop\NativeDriver->dispatch() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:138
PHP   6. Amp\Delayed->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:24-26}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php:122
PHP   7. Amp\Delayed->resolve() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:25
PHP   8. Amp\Coroutine->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:91-148}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php:149
PHP   9. Generator->send() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118
PHP  10. Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure:/home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:117-138}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118

Notice: Undefined offset: 4414 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php on line 124

Call Stack:
    0.0002     397752   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
    0.0090    1435272   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
    0.0092    1446328   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
    6.3709    3388192   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
    6.6292    3376320   5. Amp\Loop\NativeDriver->dispatch() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:138
    6.6302    3397888   6. Amp\Delayed->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:24-26}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php:122
    6.6302    3397888   7. Amp\Delayed->resolve() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:25
    6.6302    3397888   8. Amp\Coroutine->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:91-148}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php:149
    6.6302    3397984   9. Generator->send() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118
    6.6302    3397984  10. Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure:/home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:117-138}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118

PHP Notice:  Undefined offset: 4415 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php on line 124
PHP Stack trace:
PHP   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
PHP   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
PHP   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
PHP   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
PHP   5. Amp\Loop\NativeDriver->dispatch() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:138
PHP   6. Amp\Delayed->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:24-26}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php:122
PHP   7. Amp\Delayed->resolve() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:25
PHP   8. Amp\Coroutine->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:91-148}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php:149
PHP   9. Generator->send() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118
PHP  10. Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure:/home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:117-138}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118

Notice: Undefined offset: 4415 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php on line 124

Call Stack:
    0.0002     397752   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
    0.0090    1435272   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
    0.0092    1446328   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
    6.3709    3388192   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
    6.6292    3376320   5. Amp\Loop\NativeDriver->dispatch() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:138
    6.6488    3431848   6. Amp\Delayed->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:24-26}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php:122
    6.6488    3431848   7. Amp\Delayed->resolve() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:25
    6.6489    3431848   8. Amp\Coroutine->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:91-148}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php:149
    6.6489    3431944   9. Generator->send() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118
    6.6489    3431944  10. Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure:/home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:117-138}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118

PHP Notice:  Undefined offset: 4412 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php on line 124
PHP Stack trace:
PHP   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
PHP   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
PHP   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
PHP   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
PHP   5. Amp\Loop\NativeDriver->dispatch() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:138
PHP   6. Amp\Delayed->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:24-26}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php:122
PHP   7. Amp\Delayed->resolve() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:25
PHP   8. Amp\Coroutine->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:91-148}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php:149
PHP   9. Generator->send() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118
PHP  10. Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure:/home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:117-138}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118

Notice: Undefined offset: 4412 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php on line 124

Call Stack:
    0.0002     397752   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
    0.0090    1435272   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
    0.0092    1446328   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
    6.3709    3388192   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
    6.6292    3376320   5. Amp\Loop\NativeDriver->dispatch() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:138
    6.6741    3405776   6. Amp\Delayed->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:24-26}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php:122
    6.6741    3405776   7. Amp\Delayed->resolve() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:25
    6.6742    3405776   8. Amp\Coroutine->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:91-148}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php:149
    6.6742    3405872   9. Generator->send() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118
    6.6742    3405872  10. Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure:/home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:117-138}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118

PHP Notice:  Undefined offset: 4409 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php on line 124
PHP Stack trace:
PHP   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
PHP   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
PHP   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
PHP   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
PHP   5. Amp\Loop\NativeDriver->dispatch() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:138
PHP   6. Amp\Delayed->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:24-26}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php:122
PHP   7. Amp\Delayed->resolve() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:25
PHP   8. Amp\Coroutine->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:91-148}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php:149
PHP   9. Generator->send() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118
PHP  10. Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure:/home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:117-138}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118

Notice: Undefined offset: 4409 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php on line 124

Call Stack:
    0.0002     397752   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
    0.0090    1435272   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
    0.0092    1446328   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
    6.3709    3388192   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
    6.6292    3376320   5. Amp\Loop\NativeDriver->dispatch() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:138
    6.6746    3379064   6. Amp\Delayed->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:24-26}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php:122
    6.6746    3379064   7. Amp\Delayed->resolve() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:25
    6.6747    3379064   8. Amp\Coroutine->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:91-148}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php:149
    6.6747    3379160   9. Generator->send() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118
    6.6747    3379160  10. Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure:/home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:117-138}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118

PHP Notice:  Undefined offset: 4408 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php on line 124
PHP Stack trace:
PHP   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
PHP   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
PHP   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
PHP   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
PHP   5. Amp\Loop\NativeDriver->dispatch() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:138
PHP   6. Amp\Delayed->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:24-26}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php:122
PHP   7. Amp\Delayed->resolve() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:25
PHP   8. Amp\Coroutine->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:91-148}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php:149
PHP   9. Generator->send() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118
PHP  10. Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure:/home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:117-138}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118

Notice: Undefined offset: 4408 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php on line 124

Call Stack:
    0.0002     397752   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
    0.0090    1435272   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
    0.0092    1446328   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
    6.3709    3388192   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
    6.6292    3376320   5. Amp\Loop\NativeDriver->dispatch() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:138
    6.6856    3352384   6. Amp\Delayed->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:24-26}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php:122
    6.6856    3352384   7. Amp\Delayed->resolve() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:25
    6.6856    3352384   8. Amp\Coroutine->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:91-148}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php:149
    6.6856    3352480   9. Generator->send() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118
    6.6856    3352480  10. Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure:/home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:117-138}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118

PHP Notice:  Undefined offset: 4413 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php on line 124
PHP Stack trace:
PHP   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
PHP   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
PHP   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
PHP   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
PHP   5. Amp\Loop\NativeDriver->dispatch() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:138
PHP   6. Amp\Delayed->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:24-26}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php:122
PHP   7. Amp\Delayed->resolve() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:25
PHP   8. Amp\Coroutine->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:91-148}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php:149
PHP   9. Generator->send() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118
PHP  10. Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure:/home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:117-138}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118

Notice: Undefined offset: 4413 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php on line 124

Call Stack:
    0.0002     397752   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
    0.0090    1435272   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
    0.0092    1446328   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
    6.3709    3388192   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
    6.6292    3376320   5. Amp\Loop\NativeDriver->dispatch() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:138
    6.6861    3325736   6. Amp\Delayed->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:24-26}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php:122
    6.6861    3325736   7. Amp\Delayed->resolve() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:25
    6.6861    3325736   8. Amp\Coroutine->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:91-148}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php:149
    6.6861    3325832   9. Generator->send() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118
    6.6861    3325832  10. Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure:/home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:117-138}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118

PHP Notice:  Undefined offset: 4411 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php on line 124
PHP Stack trace:
PHP   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
PHP   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
PHP   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
PHP   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
PHP   5. Amp\Loop\NativeDriver->dispatch() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:138
PHP   6. Amp\Delayed->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:24-26}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php:122
PHP   7. Amp\Delayed->resolve() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:25
PHP   8. Amp\Coroutine->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:91-148}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php:149
PHP   9. Generator->send() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118
PHP  10. Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure:/home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:117-138}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118

Notice: Undefined offset: 4411 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php on line 124

Call Stack:
    0.0002     397752   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
    0.0090    1435272   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
    0.0092    1446328   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
    6.3709    3388192   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
    6.6292    3376320   5. Amp\Loop\NativeDriver->dispatch() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:138
    6.6867    3299120   6. Amp\Delayed->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:24-26}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php:122
    6.6867    3299120   7. Amp\Delayed->resolve() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:25
    6.6867    3299120   8. Amp\Coroutine->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:91-148}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php:149
    6.6867    3299216   9. Generator->send() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118
    6.6867    3299216  10. Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure:/home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:117-138}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118

PHP Notice:  Undefined offset: 4410 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php on line 124
PHP Stack trace:
PHP   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
PHP   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
PHP   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
PHP   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
PHP   5. Amp\Loop\NativeDriver->dispatch() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:138
PHP   6. Amp\Delayed->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:24-26}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php:122
PHP   7. Amp\Delayed->resolve() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:25
PHP   8. Amp\Coroutine->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:91-148}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php:149
PHP   9. Generator->send() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118
PHP  10. Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure:/home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:117-138}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118

Notice: Undefined offset: 4410 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php on line 124

Call Stack:
    0.0002     397752   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
    0.0090    1435272   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
    0.0092    1446328   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
    6.3709    3388192   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
    6.6292    3376320   5. Amp\Loop\NativeDriver->dispatch() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:138
    6.6871    3272552   6. Amp\Delayed->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:24-26}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php:122
    6.6871    3272552   7. Amp\Delayed->resolve() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php:25
    6.6871    3272552   8. Amp\Coroutine->Amp\{closure:/home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:91-148}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php:149
    6.6871    3272648   9. Generator->send() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118
    6.6871    3272648  10. Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure:/home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:117-138}() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php:118

PHP Fatal error:  Uncaught Error: Call to a member function promise() on null in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:124
Stack trace:
#0 [internal function]: Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure}()
#1 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php(118): Generator->send()
#2 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Internal/Placeholder.php(149): Amp\Coroutine->Amp\{closure}()
#3 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Delayed.php(25): Amp\Delayed->resolve()
#4 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php(122): Amp\Delayed->Amp\{closure}()
#5 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(138): Amp\Loop\NativeDriver->dispatch()
#6 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\Loop\Driver->tick()
#7 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php(95): Amp\Loop\Driver->run()
#8  in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 202

Fatal error: Uncaught Error: Call to a member function promise() on null in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 202

Amp\Parallel\Context\ContextException: Starting the process failed in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 202

Call Stack:
    0.0002     397752   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
    0.0090    1435272   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:37
    0.0092    1446328   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
    6.6984    3245096   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
    6.6989    3229288   5. Amp\Loop\NativeDriver->error() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:133

iNilo avatar Apr 17 '20 09:04 iNilo

Spun up a new lightsail image

image

Executed installs of bare minimum:

sudo yum install dnf -y
sudo dnf update -y
sudo dnf upgrade -y
sudo dnf install wget -y
sudo dnf install epel-release -y
sudo dnf install htop -y
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum -y install yum-utils
sudo yum-config-manager --enable remi-php74
sudo dnf install -y php php-cli php-xdebug openssl php-common php-curl php-json php-mbstring php-mysql php-xml php-zip php-process
PHP 7.4.4 (cli) (built: Mar 17 2020 10:40:21) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Xdebug v2.9.4, Copyright (c) 2002-2020, by Derick Rethans

Uploaded play.php

PHP Fatal error:  Uncaught Amp\TimeoutException: Operation timed out in /home/centos/web/public_html/cron/vendor/amphp/amp/lib/functions.php:253
Stack trace:
#0 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php(122): Amp\Promise\{closure}()
#1 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(138): Amp\Loop\NativeDriver->dispatch()
#2 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\Loop\Driver->tick()
#3 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php(95): Amp\Loop\Driver->run()
#4 /home/centos/web/public_html/cron/working_example/play.php(32): Amp\Loop::run()
#5 {main}

Next Amp\Parallel\Context\ContextException: Starting the process timed out in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:127
Stack trace:
#0 [internal function]: Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure}()
#1 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php(1 in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 202

Fatal error: Uncaught Amp\TimeoutException: Operation timed out in /home/centos/web/public_html/cron/vendor/amphp/amp/lib/functions.php:253
Stack trace:
#0 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php(122): Amp\Promise\{closure}()
#1 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(138): Amp\Loop\NativeDriver->dispatch()
#2 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\Loop\Driver->tick()
#3 /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php(95): Amp\Loop\Driver->run()
#4 /home/centos/web/public_html/cron/working_example/play.php(32): Amp\Loop::run()
#5 {main}

Next Amp\Parallel\Context\ContextException: Starting the process timed out in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 202

Amp\Parallel\Context\ContextException: Starting the process failed in /home/centos/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 202

Call Stack:
    0.0002     397928   1. {main}() /home/centos/web/public_html/cron/working_example/play.php:0
    0.0120    1121792   2. Amp\Loop::run() /home/centos/web/public_html/cron/working_example/play.php:32
    0.0131    1132848   3. Amp\Loop\NativeDriver->run() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
    6.1019    1727664   4. Amp\Loop\NativeDriver->tick() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
    6.1019    1720744   5. Amp\Loop\NativeDriver->error() /home/centos/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:133

So its not my specific instance, but its reproducible new ones too.

iNilo avatar Apr 18 '20 15:04 iNilo

Launched a debian 9.5 image

image

sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install wget -y
sudo apt -y install lsb-release apt-transport-https ca-certificates wget
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
sudo apt update
sudo apt-get install -y php php-cli php-xdebug openssl php-common php-curl php-json php-mbstring php-mysql php-xml php-zip
PHP 7.4.4 (cli) (built: Mar 20 2020 14:24:19) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.4, Copyright (c), by Zend Technologies
    with Xdebug v2.9.3, Copyright (c) 2002-2020, by Derick Rethans

php play.php

PHP Fatal error:  Uncaught Amp\TimeoutException: Operation timed out in /home/admin/web/public_html/cron/vendor/amphp/amp/lib/functions.php:253
Stack trace:
#0 /home/admin/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php(122): Amp\Promise\{closure}()
#1 /home/admin/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(138): Amp\Loop\NativeDriver->dispatch()
#2 /home/admin/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\Loop\Driver->tick()
#3 /home/admin/web/public_html/cron/vendor/amphp/amp/lib/Loop.php(95): Amp\Loop\Driver->run()
#4 /home/admin/web/public_html/cron/working_example/play.php(32): Amp\Loop::run()
#5 {main}

Next Amp\Parallel\Context\ContextException: Starting the process timed out in /home/admin/web/public_html/cron/vendor/amphp/parallel/lib/Context/Internal/ProcessHub.php:127
Stack trace:
#0 [internal function]: Amp\Parallel\Context\Internal\ProcessHub->Amp\Parallel\Context\Internal\{closure}()
#1 /home/admin/web/public_html/cron/vendor/amphp/amp/lib/Coroutine.php(115): Gen in /home/admin/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 202

Fatal error: Uncaught Amp\TimeoutException: Operation timed out in /home/admin/web/public_html/cron/vendor/amphp/amp/lib/functions.php:253
Stack trace:
#0 /home/admin/web/public_html/cron/vendor/amphp/amp/lib/Loop/NativeDriver.php(122): Amp\Promise\{closure}()
#1 /home/admin/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(138): Amp\Loop\NativeDriver->dispatch()
#2 /home/admin/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\Loop\Driver->tick()
#3 /home/admin/web/public_html/cron/vendor/amphp/amp/lib/Loop.php(95): Amp\Loop\Driver->run()
#4 /home/admin/web/public_html/cron/working_example/play.php(32): Amp\Loop::run()
#5 {main}

Next Amp\Parallel\Context\ContextException: Starting the process timed out in /home/admin/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 202

Amp\Parallel\Context\ContextException: Starting the process failed in /home/admin/web/public_html/cron/vendor/amphp/parallel/lib/Context/Process.php on line 202

Call Stack:
    0.0002     396048   1. {main}() /home/admin/web/public_html/cron/working_example/play.php:0
    0.0072    1120080   2. Amp\Loop::run() /home/admin/web/public_html/cron/working_example/play.php:32
    0.0074    1131136   3. Amp\Loop\NativeDriver->run() /home/admin/web/public_html/cron/vendor/amphp/amp/lib/Loop.php:95
    6.1567    1737888   4. Amp\Loop\NativeDriver->tick() /home/admin/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:72
    6.1567    1730968   5. Amp\Loop\NativeDriver->error() /home/admin/web/public_html/cron/vendor/amphp/amp/lib/Loop/Driver.php:133

iNilo avatar Apr 18 '20 16:04 iNilo