-
Notifications
You must be signed in to change notification settings - Fork 17
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
Support listen to specify sock file #114
Conversation
Will this result in the forked agent process still existing when php-fpm is exited normally? |
Added linux file lock, which solves the problem of repeated fork process; if the process is running, the same process will not be started again due to the file lock. The specific design idea comes from APUE |
This perfectly solves the problem of repeated startup of multiple processes |
Sounds good! Let me try try. |
For For |
Nginx does not set the libc::prctl (libc::PR_SET_PDEATHSIG, libc::SIGTERM) option. The user can write a script to stop the agent instead of following the PHP life cycle. Otherwise, if php-fpm does not add -F, the agent process will automatically exit. The user should decide whether to exit the agent, not php-fpm. |
libc::prctl (libc::PR_SET_PDEATHSIG, libc::SIGTERM) I think this option is not suitable here. The user should decide to stop the agent, not php-fpm, which will cause accidental killing in daemon mode. |
libc::prctl (libc::PR_SET_PDEATHSIG, libc::SIGTERM);
libc::prctl (libc::PR_SET_PDEATHSIG, libc::SIGTERM); |
|
If the user being installed does not use systemd, we should not ask the user to modify the deployment method. We should let the user read the pid through the pid file and then send the SIGTERM signal by himself. |
Has this discussion reached a conclusion? |
Is this going to work? I can see it id stale for weeks. |
I thought of a solution to solve the php-fpm -F problem
Remove libc::prctl (libc::PR_SET_PDEATHSIG, libc::SIGTERM);
Add pid lock to protect the uniqueness of the process, so that the startup process will not be restarted repeatedly
Fix the pid file location
After adding these three items, I solved this problem