-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Empty response on FreeBSD 14 using SWOOLE_PROCESS
#5174
Comments
I can not reproduce it. |
This is the closest I can get (after which curl exits with the empty reply response):
the master process seems to be a bit more useful?
os is freebsd 14.0-RC4, php is php82-8.2.11 from freebsd package repository, swoole is compiled from master with patches from ports and configured with |
<?php
use Swoole\Http\Server;
use Swoole\Http\Request;
use Swoole\Http\Response;
$server = new Swoole\HTTP\Server("127.0.0.1", 9501, SWOOLE_PROCESS);
$server->set([
'enable_coroutine' => false
]);
$server->on("Start", function(Server $server)
{
echo "Swoole http server is started at http://127.0.0.1:9501\n";
});
$server->on("Request", function(Request $request, Response $response)
{
$response->end(str_repeat('a', 1854));
});
$server->start(); Let's try closing the coroutine and see if this issue occurs. |
Same empty response, yes. FWIW, I first found this problem through laravel octane which from what I can tell also disables coroutine.
|
It is possible that this issue is related to the operating system. In my testing, I was unable to reproduce it on FreeBSD 13. |
yes, it's fine on freebsd 13. I found my apps broken after upgrading to 14.
|
@nanaya try setting sysctl net.local.dgram.maxdgram to 8192 in FreeBSD 14.x sysctl -w net.local.dgram.maxdgram=8192 |
it's already of that value. but anyway it seems to work fine now with swoole 5.1.3 on freebsd 14.1. |
Please answer these questions before submitting your issue.
And then check the response with
curl http://127.0.0.1:9501
The problem doesn't happen when using
SWOOLE_BASE
or when the response is shorter (1853 in my system).Long string of
a
php --ri swoole
)?uname -a
&php -v
&gcc -v
) ?The text was updated successfully, but these errors were encountered: