Skip to content

FlexiblePool ttl closes under MIN_SIZE workers #44

@woytam

Description

@woytam

Hi, I have found out, that Pool\Flexible with TTL closes processes under the count of Options:MIN_SIZE.
Example:

$options = [
	Options::MIN_SIZE	=> 1,
	Options::MAX_SIZE	=> 5,
	Options::TTL		=> 10,		// seconds
];
Flexible::create(new Process('exec php ...'), $loop, $options);

Pool starts with 1 worker, but after 10 seconds (Options::TTL) of inactivity, worker is closed and there is 0 workers at that time. Problem can be in function ttl, but I do not understand the logic of this function to make PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions