Daily Lucky Numbers:
4
18
24
31
35
45

max_allowed_packet

Started by ryan_dwight, June 30, 2014, 03:34:18 PM

Previous topic - Next topic

ryan_dwight

What does this error mean?


Apply Filter: Only show the error messages of this URL
http://www.myforum.com/index.php?action=battle;sa=fight;attack=739;session=8ad9209f759a4863262f9bbcbc8874e12601;
Apply Filter: Only show the errors with the same message
Database Error: Got a packet bigger than 'max_allowed_packet' bytes
Apply Filter: Only show the errors from this file
File: /home/ptcb/public_html/Sources/Load.php
Line: 2669

SA

There is probaly too many querys when fighting other members or monsters.
Your host will need to open my.cnf and edit this line and up the packet size. Even if its only temporarily that they should do it.  x stands for a number.

set-variable=max_allowed_packet=xM

ud would have to try and fix it or somthing  :)
http://samods.github.io/SAChatBar/

Customizer @ SimpleMachines

ryan_dwight

thanks for the reply SA

where can I find the my.cnf?

SA

http://samods.github.io/SAChatBar/

Customizer @ SimpleMachines

ryan_dwight

I found my.cnf but the content is only this
[mysqld]
innodb_file_per_table=1
open_files_limit=2610


location: /etc/my.cnf

Chen Zhen


If you have access to the mysql folder then edit one of these files:
my.ini
my-huge.ini

Whichever one contains the setting for max_allowed_packet

It might be set at ie. 1M whereas changing it to 16M will probably work for you.

ie.
max_allowed_packet = 16M

ryan_dwight

Quote from: Napalm on July 12, 2014, 11:15:35 PM

If you have access to the mysql folder then edit one of these files:
my.ini
my-huge.ini

Whichever one contains the setting for max_allowed_packet

It might be set at ie. 1M whereas changing it to 16M will probably work for you.

ie.
max_allowed_packet = 16M

thank you for the reply but I can't locate any of the 2 files.

Chen Zhen


With most shared hosting environments you will not have access to the mysql main folder where it is located.
If this is the case then you can ask your host to adjust that setting for you via a support ticket.
However, if you are using VPS or dedicated hosting then you should be able to find those files within your mysql folder.

What version of SMF are you currently using?
Does this error always occur while battling other members?

ryan_dwight

Before I started this thread it was smf207 and i tried myself navigating on the battle but I didn't experience any errors even in the error log I can't see my username. but there are some random user with different permission group that are experiencing this.

And yesterday I upgraded to smf208 but unfortunately it is the same errors.

Chen Zhen

The line of the error you reported while using SMF 2.0.7 seems to be related to the SMF cache.
However I only used it for the Battle Map and not really anything to do with Battling members.
The url data you posted (within the error report) seems to be during bettling other members which atm has me rather puzzled.
None the less I can post an edit to a file for you which will bypass the use of the cache.

It was used in an attempt to speed up page loads during the game's use and also to retain the same map layout for a period of time.
For a future version I was planning on implementing single images along with a jQuery routine to navigate clicked coordinates on that image and the ability to opt certain maps/images.


File:
../Sources/BattleMain.php

find:

$map = cache_get_data('battle_map_' . $user_info['id'], 3600);


replace with:

$map = false;






find:

cache_put_data('battle_map_' . $user_info['id'], $map, 3600);


replace with:

// cache_put_data('battle_map_' . $user_info['id'], $map, 3600);



Regards.

ryan_dwight

I have same result and same error after doing the edits.

If this is enabled
Use database driven sessions
Allow browsers to go back to cached pages
is there anything that affects the error?

Chen Zhen


You can attempt to alter the SMF Admin settings for cookies & settings. to see if it resolves the issue.
The mod does use a unique session value to thwart cheating and it may be causing an issue due to how your settings are configured.
Let me know if adjusting those settings works for you.

ryan_dwight

its been two days now and I didn't find the error on the log.

I unchecked the "Use database driven sessions"

Ill keep you posted if it will appear again on the log.

Thanks