Laravel队列获取getaddrinfo失败

问题描述

我将队列与数据库(作业表)一起使用并且检测到错误

 PHP_network_getaddresses: getaddrinfo Failed: ���� ���� ����������.  {"exception":"[object] (PDOException(code: 2002): sqlSTAT

在.env文件中 QUEUE_CONNECTION =数据库

在queue.PHP

  'sync' => [
        'driver' => 'sync',],'database' => [
    'driver' => 'database','table' => 'jobs','queue' => 'default','retry_after' => 90,'beanstalkd' => [
    'driver' => 'beanstalkd','host' => 'localhost','block_for' => 0,

在队列类中

  class CountArticleViews implements ShouldQueue
    {
        use dispatchable,InteractsWithQueue,Queueable,SerializesModels;

如果重要的话,我会使用laradock

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)