Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendfile一个大文件,会不会导致这个request请求被一直占用着? #158

Open
wuchuguang opened this issue Mar 30, 2018 · 1 comment

Comments

@wuchuguang
Copy link

protected function outputFile($filename, $headers = [])
    {
        $output = $this->getContext()->getOutput();
        foreach ($headers as $header=>$value){
            $output->setHeader($header, $value);
        }
        $output->response->sendfile($filename);
        $output->__isEnd = true;
    }

$filename有30m,要传1分钟,这一分钟里,会一直占用这条请求资源吗?
如果worker只有4(4个请求资源),那不就没法正常走其它业务了吗?疑问~~

@viaweb3
Copy link
Contributor

viaweb3 commented Mar 30, 2018

不会,你可以测试。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants