Very long time to delete users

Started by silber112, June 20, 2012, 06:48:26 AM

Previous topic - Next topic

silber112

My forum works perfectly but everitime I whant to delete 1 user it takes more than 20 minutes to delete it. Sometimes this users doesnt have more than 2 messages.

Can someone help me? I use SMF 2.0.2

log in, and the rest work perfectly.. Thanks a lot.

redone

Check your forum error logs, check your server logs. Could be a server issue more than an SMF one. I have never seen that issue before.


Colin

Would you mind listing the mods you have installed?
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

silber112

Quote from: Colin on June 20, 2012, 12:42:55 PM
Would you mind listing the mods you have installed?

Users Online Today, Member Color Link, Simple Audio Video Embedder, Ultimate Profile.

Quote from: RedOne on June 20, 2012, 11:40:33 AM
Check your forum error logs, check your server logs. Could be a server issue more than an SMF one. I have never seen that issue before.

Everithing works perfectly. The only thing that make problems is delete users..

What do I have to look for in the error log?

Colin

Please just copy and paste the most recent messages after attempting to delete a user.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

BigMike

I realize this is an older post but I am experiencing the same issue.

Quote from: silber112 on June 20, 2012, 06:48:26 AM
My forum works perfectly but everitime I whant to delete 1 user it takes more than 20 minutes to delete it. Sometimes this users doesnt have more than 2 messages.

Can someone help me? I use SMF 2.0.2

log in, and the rest work perfectly.. Thanks a lot.
silber112,

Did you ever figure your issue out?

My SMF takes around 13 mins to remove 1 member, as originally reported here:
http://www.simplemachines.org/community/index.php?topic=283309.msg3467437#msg3467437
and also here
http://www.simplemachines.org/community/index.php?topic=283309.msg3467477#msg3467477

(as I was not sure what the problem was at the time, I accused a mod that I had just installed before discovering this issue)
(I then removed the mod only to find the same issue)

I rarely delete anyone, usually just ban accounts and leave them, so I cannot say how we've had this issue other than I just discovered it today.

Quote from: RedOne on June 20, 2012, 11:40:33 AM
Could be a server issue more than an SMF one. I have never seen that issue before.
I fully suspect this is the cause but I'm going to need some help. I have a dedicated CentOS/Apache/cPanel server with full root access.

Quote from: RedOne on June 20, 2012, 11:40:33 AM
check your server logs
What logs am I looking for exactly? PHP? MySQL? Also, where are they normally stored?

Thank you kindly in advance,
BigMike

BigMike

Here are the contents of a file entitled "error_log" located in my forum's root folder. The file is 0.7 MB in size.

Quote
[08-Jan-2013 21:00:04] PHP Warning:  mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/boardma/public_html/Sources/Subs-Db-mysql.php on line 139
[09-Jan-2013 00:47:26] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:47:35] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:47:56] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:48:01] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:48:07] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:48:15] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:48:26] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:48:32] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:48:40] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:48:46] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:48:53] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:48:59] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:49:00] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:49:02] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:49:04] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:49:17] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:49:18] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:49:25] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:49:28] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:49:34] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:49:36] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:49:39] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:49:42] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:49:46] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:49:47] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:49:51] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:49:58] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:50:05] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:50:16] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:50:30] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:51:09] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:51:23] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:51:56] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:51:57] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:52:13] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:52:19] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:53:19] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0
[09-Jan-2013 00:55:33] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0

The first line is repeated more than 3,000 times within 2 minutes.

Here is line 139 of Subs-Db-mysql.php
return sprintf('\'%1$s\'', mysql_real_escape_string($replacement, $connection));

Any ideas?

Arantor

Holder of controversial views, all of which my own.


BigMike

#8
Quote from: Arantor on January 09, 2013, 09:07:09 AM
http://www.simplemachines.org/community/index.php?topic=423482.msg2969724#msg2969724
Arantor,

Much appreciated Sir. Errors are no longer being dumped to my error log. :) I proceeded to delete 1 user at 08:49:09 AM and it successfully reloaded the page with the user gone at 09:01:19 AM. Unfortunately no other errors are in the root dir error_log nor my SMF error log.

I have a nice and easy to use file comparison utility so I am going to compare my source files against stock ones and see if I find changes related to deletion of users. It's either something I messed up somewhere, or server configuration.

I'll keep this updated with whatever I discover :)

Thanks again!
Mike

edit: grammar

teos55

If I were you, the first thing to look at should be "ultimate profile".  Since you are trying to delete members and profile is part of it.

DB table adds are  in /Sources/Subs-Members.php according to its parse.


Just a guess ...

BigMike

#10
Thanks for the tip teos55 but we are not using the Ultimate Profile mod.

Forgot to mention our version, which is 2.0.3.

Quote from: BigMike on January 09, 2013, 12:09:43 PM
I have a nice and easy to use file comparison utility so I am going to compare my source files against stock ones and see if I find changes related to deletion of users.
Did this and found no ill core changes, and all the mods I've got were all manually entered and everything looks (as well as functions) normally.

I did run repair_settings.php and found that I had no value for Queryless URLs, which I set to Off (as recommended), but made no change.

I am pretty sure its gotta be something with my server...

BUT, I edited my my.cnf file to include "log-slow-queries" and deleted another member, and check this out:
# Query_time: 642.626440  Lock_time: 0.007308 Rows_sent: 0  Rows_examined: 2841095244
SET timestamp=1357768334;
UPDATE messages AS m
SET m.likes = (SELECT COUNT(1) FROM likes AS l WHERE l.id_message = m.id_msg);

642 seconds which is the 10-13 min range we are experiencing. This comes from the "SMF Likes Pro Mod". The only thing that seems strange is that the query was to update a message, but the member I am deleting is in the "Awaiting Approval" category and has no messages.

Assuming its not related, I deleted another member also from the "Awaiting Approval" section (PS. I first noticed this when deleting a full zero-post member from the Member list, so its not isolated to the Awaiting for Approval queue). Slow query log shows...

# Query_time: 648.812941  Lock_time: 0.013694 Rows_sent: 0  Rows_examined: 2838988820
SET timestamp=1357771053;
UPDATE messages AS m
SET m.likes = (SELECT COUNT(1) FROM likes AS l WHERE l.id_message = m.id_msg);


Ahh Ha!! Looks like I've found the culprit!! Gonna investigate this now...

Mike

edit: mentioned SMF version

BigMike

Okay I figured this all out and posted my crude fix over at the mod author's site here:
http://www.smfpacks.com/b65/possible-bug-relating-removal-users/1448/msg7690#msg7690

It looks to be a bug with SMF Likes Pro when a member is removed that has never performed any likes.

Carry on
BigMike

Advertisement: