You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered random crashes in a production application running on Laravel Octane with Swoole, where requests would hang indefinitely until timing out. Initially, I suspected a memory leak, but further investigation pointed to "timeout" errors in the Laravel logs from HTTP Facade. Only after these timeouts occur, all subsequent requests become unresponsive until I manually restart the daemon.
The issue was traced to a particular request that was making another request to the same server(though targeting a different endpoint). After running benchmarks locally, I was able to reproduce the problem.
Steps To Reproduce
class TestController extends Controller
{
public function foo(Request $request)
{
$response = Http::asForm()->post('http://127.0.0.1:8000/api/test/bar', [
'foo' => 'bar'
]);
return $response;
}
public function bar(Request $request) {
return $request->all();
}
}
php artisan octane:start ab -n 120 -c 24 http://127.0.0.1:8000/api/test/foo
Output:
This is ApacheBench, Version 2.3 <$Revision: 1913912 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)...apr_pollset_poll: The timeout specified has expired (70007)
Total of 1 requests completed
The text was updated successfully, but these errors were encountered:
We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here?
Octane Version
2.5.9
Laravel Version
11.x
PHP Version
8.3.11
What server type are you using?
Swoole
Server Version
5.1.4
Database Driver & Version
No response
Description
I encountered random crashes in a production application running on Laravel Octane with Swoole, where requests would hang indefinitely until timing out. Initially, I suspected a memory leak, but further investigation pointed to "timeout" errors in the Laravel logs from HTTP Facade. Only after these timeouts occur, all subsequent requests become unresponsive until I manually restart the daemon.
The issue was traced to a particular request that was making another request to the same server(though targeting a different endpoint). After running benchmarks locally, I was able to reproduce the problem.
Steps To Reproduce
php artisan octane:start
ab -n 120 -c 24 http://127.0.0.1:8000/api/test/foo
Output:
The text was updated successfully, but these errors were encountered: