swooleHow to close? How to shut down the daemon process if swoole accidentally started it?
1. I used swoole in the project today and accidentally enabled the daemon process in the configuration (that is, the process always runs in the background)
2. As a result, when debugging the socket code, the process was ended and reopened, and it always showed that the port was occupied
3. At this time, even if the terminal command running window was closed, reopen it. , the port is also occupied and the process cannot be started again. The solution is as follows:
The first step is to change the daemon process in the code to 0
The second step is to find the pid of this port number (I The port the code listens to is 9503), and the PID
command is as follows:
netstat -apn | grep 9503
Step 3: Kill the process
The command is as follows:
kill -9 18669
Now you can re-enable the listening program, and no more errors will be reported that the port is occupied
The above is the detailed content of How to shut down the daemon process with swoole. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Zend Studio 13.0.1
Powerful PHP integrated development environment

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
