Solution to swoole startup error: 1. Check whether the task process-related settings are set when the server starts; 2. Configure the onTask processing method, with code such as "task_worker_num task_max_request task_tmpdir task_ipc_mode".
The operating environment of this tutorial: Windows 7 system, Swoole 4 version, Dell G3 computer.
What should I do if I get an error when starting swoole?
swoole startup error - onTask null
Sometimes when starting swoole using someone else's framework, the following error may appear:
failed to start server. Error: swServer_start_check: onTask is null
In this case, It depends on whether the task process-related settings are set when the server is started. If so, the onTask processing method must be configured, as follows
task_worker_num task_max_request task_tmpdir task_ipc_mode
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What should I do if I get an error when starting swoole?. For more information, please follow other related articles on the PHP Chinese website!