DoctrineDBALDBALException "An exception occurred while executing ‘…’ with params […] Warning: Error while sending QUERY packet. PID=

Context : a Symfony 4.4 web app hosted on Ubuntu-based Docker image on Azure Web App connected to a MySQL 5.7 Azure Database for MySQL .

We have MANY (>5K events in Sentry per 14 days) errors like :


Case 1

DoctrineDBALDBALException

An exception occurred while executing 'SELECT qd.id as uuid, qd.content as content FROM queue_data qd WHERE qd.tag = ? LIMIT 1000' with params [...]:

Warning: Error while sending QUERY packet. PID=...

Coming from :

    // AppUtilityQueueServiceQueueDataService::getData
    
    public function getData(string $tag, int $limit = self::DEFAULT_LIMIT): array
    {
        return $this->getQueryBuilderForTag($tag)
            ->select('qd.id as uuid', 'qd.content as content')
            ->setMaxResults($limit)
            ->execute()
            ->fetchAll(FetchMode::ASSOCIATIVE);
    }

Case 2

DoctrineDBALDBALException

An exception occurred while executing 'SET NAMES utf8mb4':

Warning: Error while sending QUERY packet. PID=...

Coming from :

// custom code

private function myMethod(){
    ...
    $this->connection->executeQuery('SET NAMES utf8mb4');
    ...
}


Sentry shows 245 "issues" with this message (over 14 days) => that’s 245 different cases of the same problem, each instance having between 1 and 2K events (some instances actually come from consumers that are executed VERY frequently).

Nevertheless, it doesn’t seem to have any impact on users…

Does anyone else have the same issues ?
Is it possible to fix this ?
How ?

Cheers !

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *