Delete taking forever

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Laurentziu
Registered User
Posts: 16
Joined: Fri Nov 16, 2007 2:19 am

Delete taking forever

Post by Laurentziu »

Hello phpbb,

I am currently experiencing an issue on Delete account from admin panel. It takes forever to delete and eventually sometimes it says : 504 Gateway Time-out.

Why is this and what can i do about it ?
User avatar
janus_zonstraal
Registered User
Posts: 6450
Joined: Sat Aug 30, 2014 1:30 pm

Re: Delete taking forever

Post by janus_zonstraal »

How many users are you trying to delete on the same time?
Sorry! My English is bat ;) !!!
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5920
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: Delete taking forever

Post by thecoalman »

Based on some of you previous posts it appears you have quite a large forum. First make a backup copy of your database, with what has to be a large database only do it using SSH. Backing this up thorough web interface is likely to fail. If it were me I'm going to take the extra step to know that backup is good, populate a database on local install using XAMPP.

Once you know you have a good backup plan go into phpmyadmin in your hosting control and open the database. Scroll to the bottom and click the "check all" link, from the drop down select optimize.

If the table types are listed as Mysiam consider converting to Innodb.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
Laurentziu
Registered User
Posts: 16
Joined: Fri Nov 16, 2007 2:19 am

Re: Delete taking forever

Post by Laurentziu »

janus_zonstraal wrote: Mon Dec 25, 2023 2:44 pm How many users are you trying to delete on the same time?
Only 1 user.

@ thecoalman
I will try.
Laurentziu
Registered User
Posts: 16
Joined: Fri Nov 16, 2007 2:19 am

Re: Delete taking forever

Post by Laurentziu »

Delete takes about 1 minute and then either it works and delets whatever i've selected, or it fail with this message:
504 Gateway Time-out

What can i do to fix this? Is this a database problem or what kind?
User avatar
janus_zonstraal
Registered User
Posts: 6450
Joined: Sat Aug 30, 2014 1:30 pm

Re: Delete taking forever

Post by janus_zonstraal »

Did you read and did the suggestions from the coalman?

Also you can try to set the timeout setting in the php settings a little longer.
Sorry! My English is bat ;) !!!
Laurentziu
Registered User
Posts: 16
Joined: Fri Nov 16, 2007 2:19 am

Re: Delete taking forever

Post by Laurentziu »

I have read but haven't done that as i am pretty sure that is not the reason because i do mysqlrepair to database from time to time. I will try that also, but meanwhile, this is another error that appears:

Code: Select all

SQL ERROR [ mysqli ]

Lock wait timeout exceeded; try restarting transaction [1205]

SQL

UPDATE forumcs_config SET config_value = config_value + -1 WHERE config_name = 'num_users'

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 997
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/config/db.php
LINE: 195
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/includes/functions_user.php
LINE: 638
CALL: phpbb\config\db->increment()

FILE: [ROOT]/includes/acp/acp_users.php
LINE: 233
CALL: user_delete()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: acp_users->main()

FILE: [ROOT]/adm/index.php
LINE: 82
CALL: p_master->load_active()
wonder_wonder
Registered User
Posts: 100
Joined: Thu Feb 16, 2017 2:52 pm

Re: Delete taking forever

Post by wonder_wonder »

First of all, sorry for bump this topic, but it's just what happens to me and its, like me, in phpbb 3.3.11.

Indeed, I have a large forum, when I click to delete a user, it takes a while, and even if it ends up with a 504 (if I am through clouflare, if I deactivate cloudflare, it takes a couple of minutes but the 504 does not appear), like I comment, even if the 504 from cloudflare appears, the process continues in the background and ends up eliminating the user.

The problem is that, during these 2 or 3 minutes that it takes to do it, I cannot access to read any topic, the site index yes, but reading a subforum or if I am in a topic, publishing a response, is impossible for me, I get this error:

Code: Select all

General Error
SQL ERROR [mysqli]

Lock wait timeout exceeded; try restarting transaction [1205]

SQL

UPDATE phpbb_topics SET topic_views = topic_views + 1, topic_last_view_time = 1713682434 WHERE topic_id = 712379

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 1031
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 202
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 353
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/viewtopic.php
LINE: 2269
CALL: phpbb\db\driver\factory->sql_query()
This is because, when it is deleting the user, it locks the tables, all of them, and we cannot do anything that would increase something (for example, 1 visit in a topic...etc...).

Any possible solution to this?


Edit:
Sometimes this happens to me, I post something after several days of searching and seeing how to solve it, and as soon as I post I see how to solve it... :roll:

If we edit /etc/my.cnf and add this line:
innodb_lock_wait_timeout = 200 (in my case to test I have set the value of 200, but I think that a value of 100 or 120 is enough), for me, the problem of viewing forums, threads and others while I delete a user has disappeared, Posting costs a little more, but the database error no longer appears, which does not look very good to users.

Return to “[3.3.x] Support Forum”