The most common cause of Workerman startup failure at work is that the startup script cannot find the main process pid file. The main process pid file of Workerman versions before 3.2.2 is stored by default in Under /tmp/, some systems will clean the /tmp/ directory regularly, causing the system to fail to start.
Solution:
Method 1: Upgrade workererman to version 3.2.2 or above. The workererman3.2.2 version no longer stores the pid file under /tmp/, and also provides php xxx.php The kill command is convenient for forcibly killing the worker process.
Method 2: You can run ps aux | grep start.php | awk '{print $2}' | xargs kill -9 to forcibly kill the process. Then refer to the manual pidFile to store the pid file in a safe place.
Recommended: workerman tutorial
The above is the detailed content of Reasons and solutions for workerman failure to start. For more information, please follow other related articles on the PHP Chinese website!