|
Page 1 of 1
|
z3d0
Joined: August 2006
Posts: 81
Location: TOPICS_TABLE
|
DEBUG - Error Creating New Session
Often I'm told that the phpbb_session table is full and I must empty it manually to make the site work again. I don't know if you have my same problem, anyway here is the patch (that will be included in phpbb 3)
OPEN:
FIND:
- message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);
REPLACE WITH:
- $error = TRUE;
- if (SQL_LAYER == "mysql" || SQL_LAYER == "mysql4")
- {
- $sql_error = $db->sql_error($result);
- if ($sql_error["code"] == 1114)
- {
- $result = $db->sql_query('SHOW TABLE STATUS LIKE "'.SESSIONS_TABLE.'"');
- $row = $db->sql_fetchrow($result);
- if ($row["Type"] == "HEAP")
- {
- if ($row["Rows"] > 550)
- {
- $delete_order = (SQL_LAYER=="mysql4") ? " ORDER BY session_time ASC" : "";
- $db->sql_query("DELETE QUICK FROM ".SESSIONS_TABLE."$delete_order LIMIT 50");
- }
- else
- {
- $db->sql_query("ALTER TABLE ".SESSIONS_TABLE." MAX_ROWS=".($row["Rows"]+50));
- }
- if ($db->sql_query($sql))
- {
- $error = FALSE;
- }
- }
- }
- }
- if ($error)
- {
- message_die(CRITICAL_ERROR, "Error creating new session", "", __LINE__, __FILE__, $sql);
- }
|
#1 Wed 23 Aug, 2006 11:18 |
|
Sponsors
|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
z3d0
Joined: August 2006
Posts: 81
Location: TOPICS_TABLE
|
Re: [Patch] Error Creating New Session
Even if I added this patch, the problem seemed not to be solved...so, as suggested here, I increased the MAX_ROWS of the table (that actually in phpBBXS are 550 ) with a query like this
- ALTER TABLE phpbb_sessions MAX_ROWS = 2500;
and now it seems work fine
|
#2 Sat 26 Aug, 2006 23:58 |
|
Mighty Gorgon
Luca Libralato
Joined: August 2006
Posts: 7192
Location: Borgo San Michele
|
Re: [Patch] Error Creating New Session
Great suggestion!
I'm moving this to the Docs Section.
Thank you very much for this... many users will find this useful.
P.S.: Since it's not the first time you are suggesting me something really useful... you are upgraded to VIP with special access to Development section.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#3 Sun 27 Aug, 2006 16:16 |
|
z3d0
Joined: August 2006
Posts: 81
Location: TOPICS_TABLE
|
Re: [Patch] Error Creating New Session
thx
|
#4 Sun 27 Aug, 2006 18:19 |
|
KugeLSichA
Joined: August 2006
Posts: 803
Location: Dresden
|
Re: [Patch] Error Creating New Session
hmm i little bit confused, should we all apply this? or only if we have errors with sessions?
|
#5 Sun 27 Aug, 2006 18:48 |
|
z3d0
Joined: August 2006
Posts: 81
Location: TOPICS_TABLE
|
Re: [Patch] Error Creating New Session
It's up to you...untill you don't have problem with sessions, you shoudn't touch anything but if you want to prevent any problem, apply it
|
#6 Sun 27 Aug, 2006 19:56 |
|
Mighty Gorgon
Luca Libralato
Joined: August 2006
Posts: 7192
Location: Borgo San Michele
|
Re: [Patch] Error Creating New Session
You're right... I quote this...
It's up to you...untill you don't have problem with sessions, you shoudn't touch anything but if you want to prevent any problem, apply it
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#7 Sun 27 Aug, 2006 21:10 |
|
diegomak
Joined: January 2007
Posts: 36
Location: Medellin,Colombia
|
Re: [Patch] Error Creating New Session
Quote: SQL Error : 1114 The table 'phpbb_sessions' is full
INSERT INTO phpbb_sessions (session_id, session_user_id, session_start, session_time, session_ip, session_user_agent, session_page, session_logged_in, session_admin) VALUES ('14d3ecbe31ca3d5e9dcc308160f9b4ac', 4, 1175281452, 1175281452, 'c9e3b416', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.1.3) Gecko/20070309 Firefox/2.
I have that problem, which solution must implement
ALTER TABLE phpbb_sessions MAX_ROWS = 2500; this or the solution in the first topic??
I have IP, the firts topic is for IP? or XS?
thanks, i don't want have this problem with full table again
|
#8 Fri 30 Mar, 2007 22:07 |
|
diegomak
Joined: January 2007
Posts: 36
Location: Medellin,Colombia
|
Re: [Patch] Error Creating New Session
Hmm one day more after truncate the table are full again
Now I apply the patch, and I hope that don't have this problem again
thanks thanks Z3do
|
#9 Sat 31 Mar, 2007 16:53 |
|
diegomak
Joined: January 2007
Posts: 36
Location: Medellin,Colombia
|
Re: [Patch] Error Creating New Session
ok, for 1 month this solution work, but now my website have more than 1200 users and the error appear again.
I believed that the solution is
- ALTER TABLE phpbb_sessions MAX_ROWS = 9999;
because of 2500 register are reached easily in my website in this moments.
my question now is this?
when my website grows again, this value was small again.
what is the maximum value than I can set up
thanks
EDIT:
AND waht about this table phpbb_sessions_keys¿???
i can truncate this table too, or if I do that, I will have troubles??
|
#10 Mon 14 May, 2007 15:06 |
|
Mighty Gorgon
Luca Libralato
Joined: August 2006
Posts: 7192
Location: Borgo San Michele
|
Re: [Patch] Error Creating New Session
Your table is HEAP or MyISAM?
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#11 Tue 15 May, 2007 23:47 |
|
diegomak
Joined: January 2007
Posts: 36
Location: Medellin,Colombia
|
Re: [Patch] Error Creating New Session
is heap MG, I will that with heap table this problem don't appear again but
now 1300 users
thanks, for now 9999 rows works
|
#12 Sat 19 May, 2007 19:02 |
|
Mighty Gorgon
Luca Libralato
Joined: August 2006
Posts: 7192
Location: Borgo San Michele
|
Re: [Patch] Error Creating New Session
is heap MG, I will that with heap table this problem don't appear again but
now 1300 users
thanks, for now 9999 rows works
Convert it to MyISAM.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#13 Sun 20 May, 2007 15:38 |
|
diegomak
Joined: January 2007
Posts: 36
Location: Medellin,Colombia
|
Re: [Patch] Error Creating New Session
Convert it to MyISAM.
I've edited the code to Icy Phoenix.
Anyway you may even decide to convert the table from HEAP to MyISAM.
HEAP type has the advantage to remain loaded in memory, so SQL are a bit faster, but MyISAM should not have the problem listed above.
I use MyISAM...
I don`t know how do that.
but now, I ask,
in the final version(1.1.0.15) you do that(myISAM table??)
in the final version I need apply this patch???(in the first topic)
jeje my forum around 1800 users now
|
#14 Wed 30 May, 2007 01:38 |
|
Mighty Gorgon
Luca Libralato
Joined: August 2006
Posts: 7192
Location: Borgo San Michele
|
Re: [Patch] Error Creating New Session
If you don't know how to do it... don't do it...
On a clean installation sessions table is MyISAM.
I won't convert tables with the upgrade script, because it may leads to some problems if not done properly.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#15 Wed 30 May, 2007 12:17 |
|
|
Page 1 of 1
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
Similar Topics
Similar Topics
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|