3.1.1 Database operation "Prune users" fails silently

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Ideas Centre
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
Locked
Lady_G
Registered User
Posts: 247
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

3.1.1 Database operation "Prune users" fails silently

Post by Lady_G »

Support Request Template
What version of phpBB are you using? phpBB 3.1.1
What is your board's URL? localhost
Who do you host your board with? none
How did you install your board? Please select your answer
What is the most recent action performed on your board? Please select your answer
Is registration required to reproduce this issue? No
Do you have any MODs installed? No
What styles do you currently have installed? Prosilver
What language(s) is your board currently using? American English
Which database type/version are you using? PostgreSQL
What is your level of experience? Experienced with PHP and phpBB
When did your problem begin? After upgrade from 3.0.12 to 3.1.1. This is a test configuration on localhost.
Please describe your problem. I wish to reduce the size of my test database by pruning inactive users. In Prune users, I selected the following parameters:

Username: *
Last active: Before 2014-06-30
Delete pruned user posts: Yes
Deactivate or delete: Delete

After waiting 15 minutes, I received the confirmation page listing 33526 members, all boxes are checked.

Then, are you sure you wish to carry out this operation? Yes

I am immediately taken the the Forums --> Prune forum entry screen in the administration control panel. There are no messages, no prune operation is performed.

The prune operation has failed silently. No other problems are experienced.

My statistics:
PostgreSQL database size: 12 GB
Total posts: 2076723
Total topics: 136982
Total members 37742

I could not locate this problem in the Area51 bug tracker. Has anyone experienced a similar problem? If so, I will report it as a bug.

Further debugging:

I attempted a similar operation on my 3.0.12 database. The prune operation starts, then fails 2 hours later with:

Code: Select all

General Error
SQL ERROR [ postgres ]

ERROR: stack depth limit exceeded HINT: Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the platform's stack depth limit is adequate. []

SQL

SELECT search_key FROM search_results WHERE search_keywords...(a very long message)

BACKTRACE

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

FILE: [ROOT]/includes/db/dbal.php
LINE: 754
CALL: trigger_error()

FILE: [ROOT]/includes/db/postgres.php
LINE: 211
CALL: dbal->sql_error()

FILE: [ROOT]/includes/search/search.php
LINE: 283
CALL: dbal_postgres->sql_query()

FILE: [ROOT]/includes/search/fulltext_native.php
LINE: 1337
CALL: search_backend->destroy_cache()

FILE: [ROOT]/includes/functions_admin.php
LINE: 868
CALL: fulltext_native->index_remove()

FILE: [ROOT]/includes/functions_user.php
LINE: 496
CALL: delete_posts()

FILE: [ROOT]/includes/acp/acp_prune.php
LINE: 261
CALL: user_delete()

FILE: [ROOT]/includes/acp/acp_prune.php
LINE: 44
CALL: acp_prune->prune_users()

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

FILE: [ROOT]/adm/index.php
LINE: 74
CALL: p_master->load_active()
I believe the operation should fail with an error message, similar to 3.0.12. It should not fail silently.

Generated by SRT Generator
Lady_G
Registered User
Posts: 247
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: 3.1.1 Database operation "Prune users" fails silently

Post by Lady_G »

Bug report PHPBB3-13288 has been submitted.
User avatar
KevC
Support Team Member
Support Team Member
Posts: 69992
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: 3.1.1 Database operation "Prune users" fails silently

Post by KevC »

You're trying to prune 33000 users AND their posts as well? I'm not surprised it's timing out.
-:|:- 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
Alien_Time
Registered User
Posts: 389
Joined: Fri Dec 31, 2010 7:08 am

Re: 3.1.1 Database operation "Prune users" fails silently

Post by Alien_Time »

Could it be due to php max execution time? Is there any errors in php logs.
User avatar
Lumpy Burgertushie
Registered User
Posts: 67908
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: 3.1.1 Database operation "Prune users" fails silently

Post by Lumpy Burgertushie »

it is not a bug, you are trying to do to much at one time and your server is timing out.

change your parameters to a different date or whatever so that it does not do so many at one time.
then you keep doing that until you have them all gone.

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

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
P_I
Registered User
Posts: 1191
Joined: Tue Mar 01, 2011 8:35 pm
Location: Staying home - Calgary
Contact:

Re: 3.1.1 Database operation "Prune users" fails silently

Post by P_I »

Lumpy Burgertushie wrote:it is not a bug, you are trying to do to much at one time and your server is timing out.
I respectfully disagree. Trying to do too much at one time is the underlying problem, but the OP is reporting the bug as the silent failure when the server times out, not the fact that the operation failed.

Failures should never be silent, the user/administrator should receive an indication that something has failed, so they can investigate and hopefully resolve it. As you and others have mentioned, for admins this usually means looking at other log files to understand the underlying cause.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams
User avatar
Alien_Time
Registered User
Posts: 389
Joined: Fri Dec 31, 2010 7:08 am

Re: 3.1.1 Database operation "Prune users" fails silently

Post by Alien_Time »

P_I wrote:Failures should never be silent, the user/administrator should receive an indication that something has failed, so they can investigate and hopefully resolve it. As you and others have mentioned, for admins this usually means looking at other log files to understand the underlying cause.
You are right. But if it is a php error, they are usually suppressed from showing in production sites in which case it will fail silently and we need to look at server log. So not sure if this can be classified as a bug if it was due to php execution timeout.
Lady_G
Registered User
Posts: 247
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: 3.1.1 Database operation "Prune users" fails silently

Post by Lady_G »

I agree that deletion of 33,000 users AND their posts may have exceed some limits. However, my intention is to test these limits.

Verification of "corner cases" (extreme limits) can often find problems that may not be discovered until much later in the production process. The later problem may also be harder to reproduce and to debug.

My point of reporting the bug is for a change in behavior from 3.0.12 to 3.1.1. The prior version handled the error condition with a very clear error message within the admin control panel. This version has no message.

Additionally, the jump to the Prune forum section indicates a problem. It should have returned to the Prune users menu.

(I am in full agreement with P_I - errors should never be silent. The prior version was very clear to declare an error. Why is there no error in 3.1.1? That is my concern.)
Lady_G
Registered User
Posts: 247
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: 3.1.1 Database operation "Prune users" fails silently

Post by Lady_G »

I have repeated this bug in version 3.1.4 and have updated the bug report: [PHPBB3-13288] "Prune users" fails silently - phpBB Tracker

In another topic related to extension support ( Re: PostgreSQL error: value too long for type character vary) there is mention of limitations imposed on postgreSQL:
VSE wrote:It's more of a Postgres problem. For example, MySQL can store up to about 65,000 characters in a rule message. For some reason only 4,000 is assigned to postgres and mssql.
Is there a similar limitation imposed for pruning users? I don't know, so I thought I should ask this question.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 22545
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: 3.1.1 Database operation "Prune users" fails silently

Post by Mick »

It's the server timing out not phpBB. Being as this is locally hosted you should check the server error logs and see what they say about this issue.
"The more connected we get the more alone we become" - Kyle Broflovski©
Lady_G
Registered User
Posts: 247
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: 3.1.1 Database operation "Prune users" fails silently

Post by Lady_G »

My apologies, as I did not understand the earlier suggestions (from 2014) to look for a "timeout" error in the server logs. I did not look in the server log for an error of any type - which is my mistake.

Going forward, my localhost server log (Apache) has identified an error due to the prune operation.

Code: Select all

[:error] [pid 2790] [client 127.0.0.1:39771] PHP Warning:  Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0, referer: http://localhost/forum/adm/index.php?i=acp_prune&sid=0e4bf6033428c20a0f4815aef9d72996&mode=users
Admin Control Panel --> System --> PHP Information is reporting:

Code: Select all

DIRECTIVE	    LOCAL VALUE	MASTER VALUE
max_input_vars	1000	       1000
I do not see this as a timeout error, but an error which exceeds a limit. This limit should not be changed.

Can phpBB detect this error (operation did not complete) and display an error message?

I have updated the bug report.
Locked

Return to “[3.1.x] Support Forum”