Prune Users not working

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
bipolarmorgan
Registered User
Posts: 98
Joined: Tue Jul 07, 2015 7:27 pm
Location: Cyberspace
Name: Morgan
Contact:

Prune Users not working

Post by bipolarmorgan » Fri Aug 09, 2019 10:51 am

I have a large amount of users that I want to prune, but every time I attempt it fails. It just returns to the prune ACP screen and didn't actually delete any users. Please advise!

Using phpBB 3.2.7

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69239
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Prune Users not working

Post by KevC » Fri Aug 09, 2019 10:55 am

How many is a large amount?
It'll probably time out if you try to do more than 100.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

User avatar
bipolarmorgan
Registered User
Posts: 98
Joined: Tue Jul 07, 2015 7:27 pm
Location: Cyberspace
Name: Morgan
Contact:

Re: Prune Users not working

Post by bipolarmorgan » Fri Aug 09, 2019 12:20 pm

KevC wrote:
Fri Aug 09, 2019 10:55 am
How many is a large amount?
It'll probably time out if you try to do more than 100.
Most likely over 100.... I tried to narrow it down but no luck.

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69239
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Prune Users not working

Post by KevC » Fri Aug 09, 2019 12:26 pm

Are you trying to delete their posts as well?

Does it work with 2 or 3?
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

User avatar
bipolarmorgan
Registered User
Posts: 98
Joined: Tue Jul 07, 2015 7:27 pm
Location: Cyberspace
Name: Morgan
Contact:

Re: Prune Users not working

Post by bipolarmorgan » Fri Aug 09, 2019 12:32 pm

KevC wrote:
Fri Aug 09, 2019 12:26 pm
Are you trying to delete their posts as well?

Does it work with 2 or 3?
No i was selecting users with 0 posts, and yes i can delete a few at a time...

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69239
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Prune Users not working

Post by KevC » Fri Aug 09, 2019 12:35 pm

It's quite a big query for the database to run as the tables are interlinked and the user IDs cross referenced in several places so you'll need to just play around deleting various amounts to see at what point it's happy to run it without timing out. It's a database limitation rather than a phpBB one.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

User avatar
bipolarmorgan
Registered User
Posts: 98
Joined: Tue Jul 07, 2015 7:27 pm
Location: Cyberspace
Name: Morgan
Contact:

Re: Prune Users not working

Post by bipolarmorgan » Fri Aug 09, 2019 1:06 pm

KevC wrote:
Fri Aug 09, 2019 12:35 pm
It's quite a big query for the database to run as the tables are interlinked and the user IDs cross referenced in several places so you'll need to just play around deleting various amounts to see at what point it's happy to run it without timing out. It's a database limitation rather than a phpBB one.
I don't know, if i ran a sql query to delete the same users, then i could delete like 1000 at a time.... I've done it that way on my devserver.... so why can't phpbb do it?

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69239
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Prune Users not working

Post by KevC » Fri Aug 09, 2019 1:49 pm

Because you end up with orphaned references in other tables. You'll really mess things up if you do it that way.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

User avatar
bipolarmorgan
Registered User
Posts: 98
Joined: Tue Jul 07, 2015 7:27 pm
Location: Cyberspace
Name: Morgan
Contact:

Re: Prune Users not working

Post by bipolarmorgan » Fri Aug 09, 2019 2:19 pm

KevC wrote:
Fri Aug 09, 2019 1:49 pm
Because you end up with orphaned references in other tables. You'll really mess things up if you do it that way.
phpBB uses sql commands to do it too, so if i knew those then i could run it in mysql and be done rather quickly. Why isnt this built into the cli?

And it didn't appear to mess anything up on my devserver.....

User avatar
warmweer
Registered User
Posts: 2390
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: Prune Users not working

Post by warmweer » Fri Aug 09, 2019 2:28 pm

bipolarmorgan wrote:
Fri Aug 09, 2019 2:19 pm
phpBB uses sql commands to do it too, so if i knew those then i could run it in mysql and be done rather quickly.
...because phpBB uses many SQL commands to achieve the correct result, fed by parameters, conditions and variables.
If you're savvy enough (which I am not at all), it could be possible to create the SQLs based on the relevant procedures in the php-files, but that's something I'ld only risk if there were no other way. In this case there is another way and it's tested and proven.
My board's not broken, it just went peculiar

User avatar
david63
Registered User
Posts: 16330
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Prune Users not working

Post by david63 » Fri Aug 09, 2019 2:35 pm

warmweer wrote:
Fri Aug 09, 2019 2:28 pm
f you're savvy enough (which I am not at all), it could be possible to create the SQLs based on the relevant procedures in the php-files,
And by the time you had worked out what all the relevant sql statements were and tested them you could have the job done via ACP
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Lumpy Burgertushie
Registered User
Posts: 66490
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Prune Users not working

Post by Lumpy Burgertushie » Fri Aug 09, 2019 3:32 pm

and it would not be any faster because you would be doing the same thing that phpbb is doing. I doubt that doing it via phpbb is adding much if any overhead to the process.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
bipolarmorgan
Registered User
Posts: 98
Joined: Tue Jul 07, 2015 7:27 pm
Location: Cyberspace
Name: Morgan
Contact:

Re: Prune Users not working

Post by bipolarmorgan » Fri Aug 09, 2019 4:13 pm

Woh, slow your horses there guys... i told you it doesn't work properly and you blame mysql, yet phpbb is the one making the sql statements. so why can i run the sql commands directly in mysql and it works, but doesn't in phpbb's built in prune users function?

You are missing the point here clearly guys, instead of wasting time saying phpBB's function works, when it clearly doesn't, how about you try to help me. Otherwise, I don't really need your negative input.

I don't understand how this is such a difficult topic to discuss right now, but if you take a step back and look at it from my point of view, you might see it differently.

Also I'm only wanting to delete users with 0 posts who never activated... so that should help the thought process...

And in simulation on my devserver...

Code: Select all

 722 rows deleted. (Query took 1.1063 seconds.)
DELETE FROM phpbb_users WHERE user_type = 1 AND user_lastpost_time = 0 AND user_posts = 0
Nothing is messed up and I removed a bunch of users in 1.1 seconds, that's a hell of a lot faster than trying to remove them 25 at a time by the prune function, ... if the prune function even worked properly to begin with.

THEN, I also ran...

Code: Select all

203 rows deleted. (Query took 0.0412 seconds.)
DELETE FROM phpbb_users WHERE user_type = 1 AND user_posts = 0
Still nothing broken and that was much faster than the phpbb prune system... but tell me again how you think i'm wrong...

Code: Select all

100822 rows deleted. (Query took 26.2806 seconds.)
DELETE FROM `phpbb_users` WHERE user_posts = 0 AND user_type = 0

User avatar
warmweer
Registered User
Posts: 2390
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: Prune Users not working

Post by warmweer » Fri Aug 09, 2019 5:25 pm

bipolarmorgan wrote:
Fri Aug 09, 2019 4:13 pm
Still nothing broken and that was much faster than the phpbb prune system... but tell me again how you think i'm wrong...

Code: Select all

100822 rows deleted. (Query took 26.2806 seconds.)
DELETE FROM `phpbb_users` WHERE user_posts = 0 AND user_type = 0
Nobody's telling you that you're wrong. But then again nobody's telling you that you're right either. What they are telling you is that you're taking a (unnecessary) risk.
Before doing something like that, I would first identify which users (the user_id), and then check in which other tables they are referenced (and what effect that has), and like david63 pointed out, that might take longer than using phpBB's internal system.
My board's not broken, it just went peculiar

User avatar
bipolarmorgan
Registered User
Posts: 98
Joined: Tue Jul 07, 2015 7:27 pm
Location: Cyberspace
Name: Morgan
Contact:

Re: Prune Users not working

Post by bipolarmorgan » Fri Aug 09, 2019 5:40 pm

warmweer wrote:
Fri Aug 09, 2019 5:25 pm
bipolarmorgan wrote:
Fri Aug 09, 2019 4:13 pm
Still nothing broken and that was much faster than the phpbb prune system... but tell me again how you think i'm wrong...

Code: Select all

100822 rows deleted. (Query took 26.2806 seconds.)
DELETE FROM `phpbb_users` WHERE user_posts = 0 AND user_type = 0
Nobody's telling you that you're wrong. But then again nobody's telling you that you're right either. What they are telling you is that you're taking a (unnecessary) risk.
Before doing something like that, I would first identify which users (the user_id), and then check in which other tables they are referenced (and what effect that has), and like david63 pointed out, that might take longer than using phpBB's internal system.
is not much of a risk on a dev system.... what other tables could they be referenced in that would matter??

Post Reply

Return to “[3.2.x] Support Forum”