amphp / amphp/parallel

The context stopped responding, potentially due to a fatal error or calling exit

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

Nobody has claimed this yet.

Dominant language
PHP
Stars
859
Forks
69
PR merge metrics
No merged PRs in 30d

Description

my task is get file content form url,and return

public function run(Channel $channel, Cancellation $cancellation): mixed
    {
        $client = HttpClient::create();
        try {
            $response = $client->request('GET', $this->path);
            $content = $response->getContent();
            file_put_contents(dirname(__FILE__) . '/a.pdf', $content);
            return $content;
        } catch (\Throwable $e) {
            file_put_contents(dirname(__FILE__) . '/a.txt', $e->getMessage());
        }
        return false;
    }

i get error:

Image

and i use file_put_contents(dirname(FILE) . '/a.pdf', $content); to save the file just for test, the file has 40.7M.

is the file size to big so get the error?

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

The report centers on run(Channel $channel, Cancellation $cancellation), HttpClient::create(), and the 40.7M file returned by request('GET', $this->path). First reproduce the context failure with that method and inspect the captured error details; determine whether the failure is caused by response size or another runtime condition, then document or test the confirmed behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.