1 (edited by tomasz 2009-08-10 08:04)

Topic: Unable to delete from online list

File: forum/include/functions.php
Line: 250

PunBB reported: Unable to delete from online list

Database reported: ERROR: canceling statement due to statement timeout

Failed query: DELETE FROM pun_online WHERE ident='83.21.75.15'

Hi i got this error, I checked database and I have only one record in the pun_online. I can't delete this record...What should I do to solve that?

the line where is the problem is:

if ($cur_user['user_id'] == '1')
    $db->query('DELETE FROM '.$db->prefix.'online WHERE ident=\''.$db->escape($cur_user['ident']).'\'') or error('Unable to delete from online list', __FILE__, __LINE__, $db->error());
        

all code is stored in update_users_online() function.
Is there some kind of connection between some tables, therefore I can't delete this record?

Re: Unable to delete from online list

I'd try truncating the online table.

Re: Unable to delete from online list

I've tried that.
The same:

ERROR:  canceling statement due to statement timeout

I used this:

TRUNCATE TABLE pun_online

it's strange because I've got this error almost at once, but my phpmyadmin says that query  time is: 2,004.566 ms.
I thought that this have something to do with a temporary bans. When ban is being turned off maybe that happend, don't really know...

Re: Unable to delete from online list

Is your forum highly loaded? What is the size of your forum's DB? What is the average count of online users?

Re: Unable to delete from online list

Forum isn't so higly loaded. My site jgot something about 1k users per day only.
Average online users is about 4-5 max.
But right now I've turned off this query which was deleting from the punn_online.
Thats why I have now almost 1,5k users online  since 17 august tongue
I don't know how to check size of the database online but I'll try to check that... Right now I have 1 table which is bigger then normal ;]
this table tables is:
-users( almost 10 000 records)

Re: Unable to delete from online list

tomasz wrote:

I don't know how to check size of the database online but I'll try to check that...

'You can view some server information (including the DB size) on this page: <FORUM_URL>/admin_index.php.