Skip to content

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

@langziyang

Description

@langziyang

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions