WebDev

Battle => Battle Support => Topic started by: ryan_dwight on June 30, 2014, 03:34:18 PM

Title: max_allowed_packet
Post by: ryan_dwight on June 30, 2014, 03:34:18 PM
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
Title: Re: max_allowed_packet
Post by: SA on July 08, 2014, 10:31:54 PM
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  :)
Title: Re: max_allowed_packet
Post by: ryan_dwight on July 12, 2014, 11:24:39 AM
thanks for the reply SA

where can I find the my.cnf?
Title: Re: max_allowed_packet
Post by: SA on July 12, 2014, 02:26:37 PM
speak to your host
Title: Re: max_allowed_packet
Post by: ryan_dwight on July 12, 2014, 03:42:16 PM
I found my.cnf but the content is only this
[mysqld]
innodb_file_per_table=1
open_files_limit=2610


location: /etc/my.cnf
Title: Re: max_allowed_packet
Post by: Chen Zhen 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
Title: Re: max_allowed_packet
Post by: ryan_dwight on July 14, 2014, 06:48:36 AM
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.
Title: Re: max_allowed_packet
Post by: Chen Zhen on July 15, 2014, 04:43:32 PM

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?
Title: Re: max_allowed_packet
Post by: ryan_dwight on July 16, 2014, 02:18:43 PM
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.
Title: Re: max_allowed_packet
Post by: Chen Zhen on July 16, 2014, 11:41:43 PM
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.
Title: Re: max_allowed_packet
Post by: ryan_dwight on July 23, 2014, 08:30:25 AM
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?
Title: Re: max_allowed_packet
Post by: Chen Zhen on July 23, 2014, 04:56:44 PM

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.
Title: Re: max_allowed_packet
Post by: ryan_dwight on July 26, 2014, 02:09:50 PM
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
EhPortal 1.39.6 © 2024, WebDev