Closed tux-rampage closed 4 years ago
You can set the package_max_length option to increase the maximum length limit. But this takes more memory, because Swoole-HTTP-Server keeps all requested data in memory, not disk.
$http = new Swoole\Http\Server("127.0.0.1", 9501);
$http->set([
'package_max_length' => 16 * 1024 * 1024,
])
@matyhtf but increasing body size from php.ini can also do the trick?
Or must be did in the way you provided?
If so, then how to clean the used memory by a file upload?
For those who using Laravel https://github.com/laravel/octane/issues/442#issuecomment-996013081
I created a simple setup to measure swooles I/O capacities: https://github.com/tux-rampage/swoole-io-test
During the tests I found out Swoole is always rejecting Requests larger than 2MB with the status code
413
.I guess this is related to #2373 (Which was a case I wanted to test in terms of memory consumption).
What did you do? If possible, provide a simple script for reproducing the error.
What did you expect to see?
What did you see instead?
413 Request entity too large
What version of Swoole are you using (show your
php --ri swoole
)?What is your machine environment used (including version of kernel & php & gcc) ?