-
Notifications
You must be signed in to change notification settings - Fork 387
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
StreamedResponse not working #41
Comments
Hi @mfauveau , Thanks for your bug report. I'm working on fixing it. |
This fix has been merged into the newest release. |
Hi @albertcht, thanks for the fixing this so quickly! What would it take to make it asynchronous? |
Hi @joecohens , Basically you can push stream response to a Swoole task queue. The task delivering is totally asynchronous, but the process in task worker is still synchronous. At least it will not block the normal worker process. Or you can create a process for stream response, and bind it to Swoole event, after the process is done, destroy the event binding. But in this way will consume more CPU resource. So I'm still trying to find a balance. |
Please answer these questions before submitting your issue. Thanks!
php -v
andphp --ri swoole
)PHP 7.2.0-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Nov 30 2017 13:58:33) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.2.0-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
with blackfire v1.18.0~linux-x64-non_zts72, https://blackfire.io, by SensioLabs
swoole
swoole support => enabled
Version => 2.1.3
Author => tianfeng.han[email: mikan.tenny@gmail.com]
coroutine => enabled
epoll => enabled
eventfd => enabled
timerfd => enabled
signalfd => enabled
cpu affinity => enabled
spinlock => enabled
rwlock => enabled
async http/websocket client => enabled
Linux Native AIO => enabled
pcre => enabled
zlib => enabled
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
Directive => Local Value => Master Value
swoole.aio_thread_num => 2 => 2
swoole.display_errors => On => On
swoole.use_namespace => On => On
swoole.use_shortname => On => On
swoole.fast_serialize => Off => Off
swoole.unixsock_buffer_size => 8388608 => 8388608
2. Please provide your Laravel/Lumen version.
Laravel 5.6.21
Which release version of this package are you using?
2.3.4
What did you do? If possible, provide a recipe for reproducing the error.
SomeController@show
What did you expect to see?
The string "test" being echoed. (code works with nginx/php-fpm)
What did you see instead?
0 bytes are returned and server returns a 500.
The text was updated successfully, but these errors were encountered: