👋 I think that's because the SentryBundle is not always registered, so yes I guess it would be better to register it here: https://github.com/Baldinof/roadrunner-bundle/blob/4e4997ed3c69dadbe36322672ce9389ce53d488c/src/DependencyInjection/BaldinofRoadRunnerExtension.php#L136
Hello!
This is on purpose because RoadRunner does not support streaming responses (see the feature request).
There is not much that can be done now, if your file cannot fit into memory I would suggest you to stick with php-fpm.
Thank you @iborysenko!
Added WorkerRegistry and ability to add additional worker implementations (grpc, jobs, ...) (#98)
…ions (grpc, jobs, ...)
Hello there!
Since we have long-lived queries, I suggest adding an additional configuration of collect_cycles_every. Its value will indicate how many times in how many queries the function gc_collect_cycles() should be called for the current worker.
That is, if we specify a value of 10, then this function will run every 10 requests.
I think you'll support me.
Hi,
I have this issue: I've replaced the nginx/php-fpm configuration to use rr. The problem is that the $_SERVER['DOCUMENT_ROOT'] variable is always empty. I've also tried to define them in the server section of the .rr.yaml but without success
server: command: "php public/index.php" env: - APP_RUNTIME: Baldinof\RoadRunnerBundle\Runtime\Runtime - DOCUMENT_ROOT: /usr/local/temp/current/public - TEST: test_var
The TEST variable is visible, the DOCUMENT_ROOT remains empty. What I have to do? Thanks a lot!
Hello, I used roadrunner blackfire integration from your bundle and when i'm trying to profile any page, I have problem with session. It throws an error "ErrorException: session_start(): user session functions not defined in .../.../vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:154".
I have no idea, what should cause this type of error. I suppose, that php extension wraps whole project in some "box", which doesn't allow me to call session. Why? I don't know.
I have installed php extension for blackfire (php.ini) and blackfire-php-sdk. If I run blackrire on FPM, everything works fine, so it shouldn't be problem in Symfony. Can you help me, what should be problem?
This is log of profiling. There are two requests (is that right?). First is OK, but second falls on session_start();
php-rr_1 | 2022-09-22T23:22:02.743+0200 INFO http http log {"status": 200, "method": "GET", "URI": "http://demo.test/rr/health", "remote_address": "172.18.0.1", "start": "2022-09-22T23:22:02.671+0200", "elapsed": "72.037842ms"}
php-rr_1 | 2022-09-22T23:22:02.881+0200 INFO http http log {"status": 200, "method": "GET", "URI": "http://demo.test/rr/health", "remote_address": "172.18.0.1", "start": "2022-09-22T23:22:02.674+0200", "elapsed": "206.77573ms"}
php-rr_1 | [2022-09-22 23-22-03] ErrorException: session_start(): user session functions not defined in /var/www/demo-test/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:154 @ CLI (PID: 26): bin/worker.php @@ 02bb85b74b
php-rr_1 |
php-rr_1 | network error, worker will be restarted {"reason": "network", "pid": 26, "internal_event_name": "EventWorkerError", "error": "sync_worker_exec: Network:\n\tsync_worker_exec_payload: EOF"}
php-rr_1 | 2022-09-22T23:22:03.003+0200 ERROR http execute {"start": "2022-09-22T23:22:02.890+0200", "elapsed": "113.57497ms", "error": "sync_worker_exec: Network:\n\tsync_worker_exec_payload: EOF"}
php-rr_1 | worker stopped {"internal_event_name": "EventWorkerWaitExit", "error": "signal: killed; process_wait: signal: killed", "errorCauses": [{"error": "signal: killed"}, {"error": "process_wait: signal: killed"}]}
php-rr_1 | worker is allocated {"pid": 34, "internal_event_name": "EventWorkerConstruct"}
Edit: I tried to make a minimum version of your code (without any sessions, etc.). I used only minimum code (HttpFoundationWorker and your implementation of Blackfire).
Same error :(
$kernel = new AppKernel("dev", true);
$relay = new SocketRelay("/var/run/rr.sock", null, SocketRelay::SOCK_UNIX);
$worker = new HttpFoundationWorker(new HttpWorker(new Spiral\RoadRunner\Worker($relay)));
$kernel->boot();
while ($request = $worker->waitRequest()) {
if ($request->headers->has('x-blackfire-query')) {
$query = $request->headers->get('x-blackfire-query');
$blackfireProbe = new \BlackfireProbe($query);
$blackfireProbe->enable();
} else {
$blackfireProbe = null;
}
$response = $kernel->handle($request);
if ($blackfireProbe !== null && $blackfireProbe->isEnabled()) {
$blackfireProbe->close();
[$probeHeaderName, $probeHeaderValue] = explode(':', $blackfireProbe->getResponseLine(), 2);
$response->headers->set('x-'.$probeHeaderName, trim($probeHeaderValue));
}
$worker->respond($response);
}
Symfony Controller (FPM works fine, RR on this endpoint works fine until i turn on profiling by extension):
/**
* @Route(service=RoadRunnerHealthController::class)
*/
class RoadRunnerHealthController {
/**
* @Route("/rr/health", name="route.demo.rr.health")
* @Method("GET")
*/
public function actionHealthcheck(): Response {
return new Response("<html><body>Health: OK</body></html>");
}
}
On the github page you state that we can use multiple reboot strategies, but that is not the case, since you have yet to release new version of this package with the #92 and #96 PRs
Would it be possible to release this new version?
Hello, I just released 2.3.0 with those PRs.
Hello! I think @iborysenko is working on it :)
Hi!
Nice, I'll try to review it this week :)