News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Errore 'max_allowed_packet'

Started by lia, December 31, 2004, 08:51:50 AM

Previous topic - Next topic

lia

Salve,
stamattina sul mio forum compare questo errore:

Errore del Database 
Got a packet bigger than 'max_allowed_packet'
File: /home/roliafo/public_html/Forum/Sources/Subs.php
Linea: 454 

Ho cercato sulla Community ed ho letto che bisognava aumentare il valore impostato in my.ini di PHP; ho chiesto all'Hosting il quale non può farlo poiché l'hosting è condiviso quindi aumenterebbe a tutti questo valore. Attendendo che comunque mi abiliti qualcosa, chiedo:
1- come sia stato possibile ciò? io non ho fatto nulla di strano, anzi... proprio ieri non mi sono nemmeno collegato;
2- come risolvere la cosa, ovvero almeno fare ripartire il Forum; devo cancellare il contenuto del database (quindi perdere tutto)? devo chiedere qualcosa di specifico al servizio Hosting?

Non so che fare, aiutatemi!!!

Buon 2005

Lia1971

FaSan

Ma che razza di Hosting è ?

Se usasse dei Virtual Domain il problema non ci sarebbe, inquanto esiste una copia del "my.cnf" per ogni dominio...

In ogni caso chiedi se può semplicemente riavviare il servizio, probabilmente (ma in modo temporaneo) risolvi.



FaSan

edi67

When a MySQL client or the mysqld server gets a packet bigger than max_allowed_packet bytes, it issues a Packet too large error and closes the connection.

In MySQL 3.23 the biggest possible packet is 16M (due to limits in the client/server protocol). In MySQL 4.0.1 and up, this is only limited by the amount on memory you have on your server (up to a theoretical maximum of 2G).

A communication packet is a single SQL statement sent to the MySQL server or a single row that is sent to the client.

When a MySQL client or the mysqld server gets a packet bigger than max_allowed_packet bytes, it issues a Packet too large error and closes the connection. With some clients, you may also get Lost connection to MySQL server during query error if the communication packet is too big.

Note that both the client and the server has it's own max_allowed_packet variable. If you want to handle big packets, you have to increase this variable both in the client and in the server.

It's safe to increase this variable as memory is only allocated when needed; this variable is more a precaution to catch wrong packets between the client/server and also to ensure that you don't accidentally use big packets so that you run out of memory.

If you are using the mysql client, you may specify a bigger buffer by starting the client with mysql --set-variable=max_allowed_packet=8M. Other clients have different methods to set this variable. Please note that --set-variable is deprecated since MySQL 4.0, just use --max-allowed-packet=8M instead. You can use the option file to set max_allowed_packet to a larger size in mysqld. For example, if you are expecting to store the full length of a MEDIUMBLOB into a table, you'll need to start the server with the set-variable=max_allowed_packet=16M option.

You can also get strange problems with large packets if you are using big blobs, but you haven't given mysqld access to enough memory to handle the query. If you suspect this is the case, try adding ulimit -d 256000 to the beginning of the safe_mysqld script and restart mysqld.

CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

lia

Salve,
ringrazio sia edi67 per la chiara spiegazione dell'errore (thanks!!!) e il mitico FaSan.
Da ieri il problema è scomparso, ovvero il tutto è ricominciato a funzionare come nulla fosse successo, però già nel frattempo mi ero messo al lavoro per effettuare delle verifiche nel database al fine di individuare se c'era qualcosa di strano (che mi costava, oltre al tanto tempo perso per ricaricare i dati tabella per tabella, giusto per togliermi dei dubbi...) ed ho notato che l'errore spariva "apparentemente" quando la tabella smf_settings era svuotata oppure quando caricavo i settaggi standard dell'installazione, dicevo "apparentemente" perché in Amministra > Modifica Preferenze e Opzioni non potevo espandere il menù che si ripresentava l'errore.
Non è che qualche opzione particolare delle Preferenze e Opzioni facesse di nuovo ripresentare il problema?
A proposito, cosa strana, ho fatto notare il fatto del Virtual Domain chiedendo perfino di accedere personalmente all'SSH... ancora adesso affermano che il file my.cnf è unico ed uguale per tutto l'hosting e che (ancora più allucinante) non hanno mai riavviato il servizio (come è scomparso allora l'errore?)  :o :o :o
Saluti

Lia

FaSan

Un corsetto accellerato sul chroot no eh ?  :D :D


Cmq .. tornando al problema... è strano che si presenti solo in determinate occasioni.... hai installato qualche Mod ? se sì quale ?




FaSan

lia

Salve,
è vero... non si finise mai di imparare, specie per un "ignorantone" come me, eheheheh  :D :D :D
Riguardo i Mod installati ho Experience Bar e OnLine Users Today (entrambe tue creazioni, non so se è una coincidenza oppure se non mi fido di installare mods di altri autori...) e la versione di SMF è la RC2 (aspettando che Mods e Themes per la 1.0, oltre alla traduzione ufficiale dell'italiano, siano disponibili).
Grazie ancora per la pazienza

Lia

FaSan

In realtà li avevo già inseriti, ma non ho ben capito che fine abbiano fatto...


Experience Bar l' ho già re-aggiornata, per OnLineUserToday, stò cercando di fixare un piccolo bug e poi lo re-invio ;)



FaSan

edi67

Quote from: lia on January 07, 2005, 03:07:18 AM
Salve,
è vero... non si finise mai di imparare, specie per un "ignorantone" come me, eheheheh  :D :D :D
Riguardo i Mod installati ho Experience Bar e OnLine Users Today (entrambe tue creazioni, non so se è una coincidenza oppure se non mi fido di installare mods di altri autori...) e la versione di SMF è la RC2 (aspettando che Mods e Themes per la 1.0, oltre alla traduzione ufficiale dell'italiano, siano disponibili).
Grazie ancora per la pazienza

Lia

la traduzione ufficiale in italiano lo gia resa diposnibile
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Advertisement: