MySQL server has gone away

Goodday brothers, please i need help in this error, i have been using my website for products stocks pos sales, without any issues until yesterday when my workers complained that they can not validate/ create invoice in third party customers orders, they got this error and i also tried with my administrator account, also same problems, but POS sales is working… here is the error.

Return code for latest database access request error: DB_ERROR_2006
Information for latest database access request error: MySQL server has gone away…

i have access to hosting cpanel to modify or edit any file if needled…

thank you for your help.

Dolibarr has detected a technical error.
This information can be useful for diagnostic purposes (you can set option $dolibarr_main_prod to ‘1’ to hide sensitive information):
Date: 20220914122906
Dolibarr: 15.0.3 - https://www.dolibarr.org
Level of features: 0
PHP: 7.4.30
Server: Apache
OS: Linux

Requested URL: /dolibarr/compta/facture/card.php
Referer: http://******/dolibarr/compta/facture/card.php
Menu manager: eldy_menu.php

Modules/Applications: user, variants, export, receiptprinter, ficheinter, product, stock, expedition, categorie, moceanapi, incoterm, printing, paymentbybanktransfer, adherent, supplier_proposal, notification, propal, import, banque, barcode, commande, expensereport, facture, fournisseur, salaries, service, societe, ticket, takepos
Database type manager: mysqli
Latest database access request error: SELECT s.rowid, s.nom as name, s.name_alias, s.tva_intra, s.client, s.fournisseur, s.code_client, s.code_fournisseur FROM llx_societe as s WHERE s.entity IN (1) AND (((s.client = 1 OR s.client = 3) AND s.status=1)) ORDER BY nom ASC
Return code for latest database access request error: DB_ERROR_2006
Information for latest database access request error: MySQL server has gone away

Hello,

This is due to your MYSQL configuration that stop the communication.
Most probably the max_allowed_packet is too small.

It depend on on how and where Dolibarr is installed.

thank you brother ksar, for your reply, it is installed on my hosting website folder.
www.website/dolibarr
is there a file i can modify the max allowed in config file or elsewhere.

thank you

update- i figured out it started working after adding a barcode id to each third party customer and didnt show that error again… dont know if that is a bug or error on the mysql database…

added barcode number for each third party and ask my workers to try with there user account and it did validate without that error… or its a concidence that it started working again or due to the barcode i added and it corrects it…