error creating new session

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
Tomba
Registered User
Posts: 131
Joined: Tue Jun 18, 2002 7:52 am
Location: Belgium
Name: Steven De Groote
Contact:

error creating new session

Post by Tomba » Sat Sep 07, 2002 8:57 am

I got a problem with my board this morning,
with " error : creating new session"

I have now reuploaded the files of phpBB, updated to 2.0.2 again, but I keep getting the same error

can anyone help me?
any ideas?

User avatar
primedomain
Former Team Member
Posts: 25944
Joined: Sat Dec 15, 2001 10:23 am

Post by primedomain » Sat Sep 07, 2002 9:16 am

your site wrote: DEBUG MODE
SQL Error : 1114 The table 'forum_sessions' is full
INSERT INTO forum_sessions (session

You need a database administration tool, e.g. www.phpmyadmin.net
(might be pre-installed by your hoster, e.g. lycos). If it's not pre-installed, you have to install it yourself. Don't forget to restrict access to the phpmyadmin directory. Otherwise your database would be accessible for everyone. http://www.phpmyadmin.net/documentation

1) backup your database
- phpmyadmin --> click on the database name (below "home") --> scroll down to "View dump (schema) of database". Mark all tables (or only the table forum_sessions) in the list. Check "structure and data". Check "add drop tables" , "complete inserts" and "save as file" (you may use compression, but if your database is pretty big, you will probably get a timeout).

If you have shell access to your server (telnet / ssh), take a look at this topic: http://www.phpbb.com/phpBB/viewtopic.ph ... =mysqldump

2) phpmyadmin --> click on the name of the database (below "home") --> main frame --> mark the checkbox next to forum_sessions, scroll down: drop down menu: select "empty" (NOT DROP!)
Last edited by primedomain on Sun Nov 24, 2002 11:48 am, edited 5 times in total.

Tomba
Registered User
Posts: 131
Joined: Tue Jun 18, 2002 7:52 am
Location: Belgium
Name: Steven De Groote
Contact:

table full ?!?!?

Post by Tomba » Sat Sep 07, 2002 9:17 am

phpBB : Critical Error

Error creating new session

DEBUG MODE

SQL Error : 1114 The table 'forum_sessions' is full

INSERT INTO forum_sessions (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in) VALUES ('b5921bd4845ea4a81ede099db7f0bb60', -1, 1031390173, 1031390173, 'd9887970', 0, 0)

Line : 152
File : /www/S/sdegroote/web/www.f1technical.net/forum/includes/sessions.php


how can a table get full???

User avatar
primedomain
Former Team Member
Posts: 25944
Joined: Sat Dec 15, 2001 10:23 am

Post by primedomain » Sat Sep 07, 2002 9:49 am

follow up to PM:

Heap tables: http://www.mysql.com/doc/en/HEAP.html
http://www.mysql.com/doc/en/Table_types.html
Other users have reported similar problems, usually the sessions should get deleted, but the removal process sometimes doesn't seem to work properly for some users. Might be a phpBB? mySQL? bug, I don't know.

Tomba
Registered User
Posts: 131
Joined: Tue Jun 18, 2002 7:52 am
Location: Belgium
Name: Steven De Groote
Contact:

Post by Tomba » Sat Sep 07, 2002 10:01 am

well let that be a suggestion for evaluation on phpBB 2.2
I'll report this in the bug forum

EDIT: dunno where that should be ... so with apache 1.3.24 and php4.2.0 I get that error

User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix » Sat Sep 07, 2002 10:33 am

Ashe have post an idea on a french Forum to resolve this problem :

Code: Select all

in sessions.php, find 

message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);


remplace by :

$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"] > 2500) 
         { 
            $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); 
}
It will increases the capacity of the table so necessary and empties it if it becomes too large
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:

User avatar
BadBlueBoy
Registered User
Posts: 50
Joined: Mon Sep 16, 2002 11:51 pm
Location: Croatia

Post by BadBlueBoy » Tue Sep 17, 2002 9:56 pm

primedomain wrote:
your site wrote:DEBUG MODE
SQL Error : 1114 The table 'forum_sessions' is full
INSERT INTO forum_sessions (session

You need a database administration tool, e.g. www.phpmyadmin.net

1) backup your database
- phpmyadmin --> click on the database name (below "home") --> scroll down to "View dump (schema) of database". Mark all tables (or only the table forum_sessions) in the list. Check "structure and data". Check "add drop tables" , "complete inserts" and "save as file" (you may use compression, but if your database is pretty big, you will probably get a timeout).

If you have shell access to your server (telnet / ssh), take a look at this topic: http://www.phpbb.com/phpBB/viewtopic.ph ... =mysqldump

2) phpmyadmin --> click on the name of the database (below "home") --> main frame --> mark the checkbox next to forum_sessions, scroll down: drop down menu: select "empty" (NOT DROP!)



I had same problem. And i'm doing what u said at the momment. But I wonder how come Admin panel (phpBB) and PhpMyAdmin showed me that my database is 50.6Mb big, now i'm saving *.sql file and its 87Mb and still downloading. Can you explain it? Thanx :)

User avatar
primedomain
Former Team Member
Posts: 25944
Joined: Sat Dec 15, 2001 10:23 am

Post by primedomain » Tue Sep 17, 2002 10:10 pm

That's because the backup file contains all these DROP and INSERTS (if you make a full back up). BTW, it should be sufficient to backup this specific table only, see previous posting.

User avatar
BadBlueBoy
Registered User
Posts: 50
Joined: Mon Sep 16, 2002 11:51 pm
Location: Croatia

Post by BadBlueBoy » Tue Sep 17, 2002 10:16 pm

so... this file i'm downloading could be even over 250Mb!? Just asking if it's possible, cause i've downloaded 157Mbs aldready :lol: :roll:

User avatar
primedomain
Former Team Member
Posts: 25944
Joined: Sat Dec 15, 2001 10:23 am

Post by primedomain » Tue Sep 17, 2002 10:19 pm

big forum with lots of postings and thus big search tables --> huge backup file :)

User avatar
BadBlueBoy
Registered User
Posts: 50
Joined: Mon Sep 16, 2002 11:51 pm
Location: Croatia

Post by BadBlueBoy » Tue Sep 17, 2002 10:24 pm

i have 4 subforums so in theory its possible this file is over 250Mb :( :( :(

Would it be better if i just empty sessions table? What do u recommend?

User avatar
primedomain
Former Team Member
Posts: 25944
Joined: Sat Dec 15, 2001 10:23 am

Post by primedomain » Tue Sep 17, 2002 10:28 pm

backup the session table only (i.e. mark this table only in the list in phpmyadmin), the whole backup thing is not really necessary, it's more a precautionary measure :) )

Then empty this specific table. Just make sure to empty the right one and not to drop it instead of emptying it (that's why a backup of this table could be useful :wink: )

User avatar
BadBlueBoy
Registered User
Posts: 50
Joined: Mon Sep 16, 2002 11:51 pm
Location: Croatia

Post by BadBlueBoy » Tue Sep 17, 2002 10:32 pm

arghhhh :x
i missed the part "mark all tables or just table_sessions" when i was reading your post 8)
But lucky for me file was downloaded completely :) 207Mb not bad. Now i have full backup of my tables 8)

So now i just mark the field where "session" table is and click EMPTY?

User avatar
BadBlueBoy
Registered User
Posts: 50
Joined: Mon Sep 16, 2002 11:51 pm
Location: Croatia

Post by BadBlueBoy » Tue Sep 17, 2002 10:35 pm

phpbb_search_results Browse Select Insert Properties Drop Empty 1 MyISAM 29.9 KB

phpbb_search_wordlist Browse Select Insert Properties Drop Empty 97,042 MyISAM 3.7 MB

phpbb_search_wordmatch Browse Select Insert Properties Drop Empty 1,989,335 MyISAM 30.9 MB

and..

phpbb_sessions Browse Select Insert Properties Drop Empty 550 HEAP 65.1 KB

So this 65.1kb is making trouble on my forum!?!? :roll:

R45
Registered User
Posts: 2830
Joined: Tue Nov 27, 2001 10:42 pm

Post by R45 » Tue Sep 17, 2002 10:37 pm

primedomain wrote: but the removal process sometimes doesn't seem to work properly for some users. Might be a phpBB? mySQL? bug, I don't know.
There is no removal process, thats why. Ashe's fix is a solution, but IMO, it'll be better of clearing old sessions out. Paul said for the 2.0.x branch no session clearing routines will be in (2.2 will have) so busy board with have a filled table. If you'd like, I did make a post somewhere with some code to limit 5 sessions per IP, but on large boards this may not be practical (Same IP/Multiple users). The main problem is with users with no cookie support, each time they visit the site, a row is inserted for the session, and the row is never deleted so hundreds/thousands+ of session rows are left.

Locked

Return to “2.0.x Support Forum”

Who is online

Users browsing this forum: No registered users and 19 guests