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

Operation not permitted after server OOM #919

Open
Pluuk opened this issue Jul 1, 2024 · 4 comments
Open

Operation not permitted after server OOM #919

Pluuk opened this issue Jul 1, 2024 · 4 comments

Comments

@Pluuk
Copy link

Pluuk commented Jul 1, 2024

Octane Version

2.3.4

Laravel Version

10.46.0

PHP Version

8.2.20

What server type are you using?

Swoole

Server Version

5.1.1

Database Driver & Version

No response

Description

When the server runs out of memory, swoole is restarted after a restart of the server. Swoole thinks that the process should still be active because the PID is still in the octane-server-state.json, but this process ID doesn't exist anymore. Then in line 22-24 of src/Swoole/SwooleExtension.php it tries to kill a PID which doesn't exist anymore, receives a Operation not permitted[1] error and crashes the process, which is not started anymore.

Steps To Reproduce

  1. Create a laravel octane instance.
  2. Start up the server
  3. Trigger an OOM error on the server
  4. Try to restart the octane instance
Copy link

github-actions bot commented Jul 1, 2024

Thank you for reporting this issue!

As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.

If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.

Thank you!

@driesvints
Copy link
Member

Thanks @Pluuk. Would appreciate help here in handling this gracefully. Most likely we'll need to somehow check if the PID still exists first?

@Pluuk
Copy link
Author

Pluuk commented Jul 1, 2024

Yes, but it could also be the case that the PID exists, but is not owned by octane anymore, thus we're not allowed to kill it. I'm not familiar enough with this, so I'm not able to create a PR for this unfortunately.

@paramientos
Copy link

paramientos commented Sep 19, 2024

Hey! Try chown -R www-data:www-data . on the root folder of Laravel if you are using Nginx as a web server

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

3 participants