beyondcode / beyondcode/herd-community
[Bug]: php processes lying around on the system
- Dominant language
- No language data
- Stars
- 122
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
### Platform
macOS
### Operating system version
macos golden gate
### System architecture
ARM64 (M1, M2, etc)
### Herd Version
1.29.0
### PHP Version
PHP 8.5
### Bug description
[ I am giving this feedback as a response to Apple Feedback ticket related to upcoming macOS ].
in my macOS Golden Gate while working with my projects ever so often I reached a point where almost all the applications stopped working and started giving me unexpected behavior including the terminal when I ran any command on my existing terminal it will get stuck indefinitely.One very clear signal was visible when I open a new tab I will clearly see the error -
[forkpty: Resource temporarily unavailable]
[Could not create a new process and open a pseudo-tty.]
and rebooting the system will fix my problem but I comes back in few ours and I will have to reboot again
as I am running a developer beta of operating system I am expected to have unexpected bugs and behaviors so as my first though I notified Apple feedback team about the issue with my mac data and they replied after analyzing data that there are too many php processes lying around on the system so many that the system becomes unable to create new processed.
this my the response I got from Apple
Thank you for filing this feedback report. We reviewed your report and determined the behavior you experienced is currently functioning as intended.
Please verify why there's a lot of php processes lying around on the system.
forkpty does open + fork. In this case, it seems like fork is failing because the kern.maxprocperuid sysctl has blown past.
Looking at ps.txt in the sysdiagnose, we see a ton of these:
```
shourya 501 - 19177 3629 4004 0.0 0.0 31 0 488946608 1280 - ?? S 5:24AM 0:00.05 /Users/shourya/Library/Application Support/Herd/bin/php
```
And sysctl.txt shows:
```
$ rg maxprocperuid sysctl.txt
40:kern.maxprocperuid: 1333
```
We're basically at the limit:
$ rg shourya ps.txt | wc -l
1372
### Steps to reproduce
it happens in the macOS Golden Gate with heard running, in parallel I am also running vscode, codex and google chrome
### Relevant log output
```shell
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue on macOS Golden Gate with Herd 1.29.0, PHP 8.5, and an ARM64 system while monitoring the PHP processes described in the report. No source files or tests are named; investigate why Herd leaves processes running and verify that process counts remain bounded and new terminal processes can be created without the forkpty error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, php
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100