Skip to content
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

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

Closed
juancamunoz opened this issue Jan 18, 2024 · 2 comments
Closed

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

juancamunoz opened this issue Jan 18, 2024 · 2 comments
Assignees

Comments

@juancamunoz
Copy link

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
Copy link
Contributor

dunglas commented Jan 18, 2024

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

@juancamunoz
Copy link
Author

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 🤦🏼.

ibrunotome added a commit to ibrunotome/docs that referenced this issue Jul 18, 2024
--max-requests=1 will not work because the number of workers will be bigger than 1 

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

laravel/octane#816 (comment)
taylorotwell added a commit to laravel/docs that referenced this issue Jul 18, 2024
* Update octane.md

--max-requests=1 will not work because the number of workers will be bigger than 1 

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

laravel/octane#816 (comment)

* Update octane.md

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants