NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
# eventLoop has already been created. unable to create swoole\_server 创建`Server`出现: ~~~ PHP Fatal error: swoole_server::__construct(): eventLoop has already been created. unable to create swoole_server. ~~~ 这表示你的程序在`new swoole_server`之前使用了其他异步IO的API,底层已经创建了`EventLoop`,无法重复创建。 这是错误的用法,如果要在`Server`中使用异步的`Client`、`MySQL`、`Redis`,请在`Server`的`onWorkerStart`回调函数或其他发生在`Worker`进程内的回调函数中使用。