laravel / octane

Supercharge your Laravel application's performance.
https://laravel.com/docs/octane
MIT License
3.74k stars 291 forks source link

[FRANKENPHP] Looks like max-requests flag does not work #816

Closed juancamunoz closed 7 months ago

juancamunoz commented 7 months ago

Octane Version

2.3

Laravel Version

10.10

PHP Version

8.3

What server type are you using?

FrankenPHP

Server Version

latest

Database Driver & Version

No response

Description

I'm trying to create a project with Laravel & FrankenPHP, it works good but the problem comes when I try to auto-reload the changed files. Since I don't want to use --watch (because it's only available with nodejs and i'm using Bun) I'm trying to set the max-requests to 1 to auto-reload the server on each request only for development, but it does not work.

Steps To Reproduce

I'm starting the server with php artisan octane:frankenphp --max-requests=1

dunglas commented 7 months ago

The number of maximum requests is per worker, and by default, FrankenPHP starts many workers (2 times the number of CPUs).

juancamunoz commented 7 months ago

The number of maximum requests is per worker, and by default, FrankenPHP starts many workers (2 times the number of CPUs).

Absolutely, changing to php artisan octane:frankenphp --max-requests=1 --workers=1 reloads on each request. Sorry 🤦🏼.