hhxsv5 / laravel-s

LaravelS is an out-of-the-box adapter between Laravel/Lumen and Swoole.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mysql 8.0.27 提示 Packets out of order. Expected 1 received 0. Packet size=145

dellif opened this issue · comments

commented
  1. Your software version (Screenshot of your startup)

    Software Version
    PHP PHP 7.2.34-24+ubuntu20.04.1
    Swoole 4.7.1
    Laravel 5.5.49
  2. Detail description about this issue(error/log)

    Uncaught exception 'Illuminate\Database\QueryException': [0]Packets out of order. Expected 1 received 0. Packet size=145 (SQL: select * from user_extendwhereuser_id = 13182244 limit 1) called in /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664

  3. Some reproducible code blocks and steps

        /**
     * @param array|string[] $columns
     * @return null|\Illuminate\Database\Eloquent\Builder|mixed|Model|object|UserExtend
     */
    public function getByUserId(int $userId, array $columns = ['*'])
    {
        return $this->model->newQuery()
            ->select($columns)
            ->where('user_id', $userId)
            ->first();
    }

mysql 版本是 8.0.27,现在是应用每天都会偶发一两次,都是发生在查询的时候报的错误

commented

@hhxsv5 MySQL已经配置已经调整,还是会出现这个错误,请问还有哪些方面会影响到的 ?

image
已经设置了,仍然还是出现问题,可以排除的是网络没有波动,laravels框架里面是否还有其他参数需要优化配置的 ? @hhxsv5