When using 2.1.0 if I go to purge messages and select only the trash folder as criteria the popup status box seems to hang when there are more than 1000 messages. If I add a date constraint to reduce the number of messages below 1000 it does not hang and says it deleted all of them but when I do another purge for the same time period it shows 25 less than before. Each time I redo it it shows 25 less. So it appears it is hanging above 1000 and anything below does not hang and purges in increments of 25 even though it says all are purged. Any ideas?
Jul 31, 2002, 2:24 AM
Enthusiast (907 posts)
Jul 31, 2002, 2:24 AM
Post #2 of 17
Views: 8055
Oh! This happened to me always. I do not think there is a bug, but perhaphs either the scrip is getting killed somewhere due to some strange reason or it is supposed to delete 20 - 25 messages each time.
This has happened to me WITHOUT an exception and I cannot beleive that it could be due to any message header etc, problem.
As you may checkout my earlier message Trash bug or delete bug title from the posts I have made. This is explained more how I have solved it and think about it.
Interestingly the empty folder works SO EFFECTIVE in comparision to purge. May be because for purge function, it has to connect database so many times and put everything into RAM, as compared to only data of one user and the respective connection. However, I say this here without even looking at the code and hence it is a simple presumption, so I could be wrong.
This has happened to me WITHOUT an exception and I cannot beleive that it could be due to any message header etc, problem.
As you may checkout my earlier message Trash bug or delete bug title from the posts I have made. This is explained more how I have solved it and think about it.
Interestingly the empty folder works SO EFFECTIVE in comparision to purge. May be because for purge function, it has to connect database so many times and put everything into RAM, as compared to only data of one user and the respective connection. However, I say this here without even looking at the code and hence it is a simple presumption, so I could be wrong.
Aug 1, 2002, 4:21 PM
Novice (41 posts)
Aug 1, 2002, 4:21 PM
Post #3 of 17
Views: 8028
Thanks for your comments Rajani. Well I would consider it a bug since:
1) The message says all are deleted but only 25 of the requested ones were - both cannot be correct.
2) It appears the purge messages function is intended to be a global function to be used for example if an admin wants to delete everyones trash. Somehow I doubt it is intended behavior to limit it to 25 deletions at a time. At that rate it will take 40 trys to delete just 1000 messages. Imagine if one had to delete 10,000 trash messages it would take 400 trys!
As far as why it locks up when over 1000 are purged, it could be a server resource issue but without looking at the code I am not sure how it is done so we'll have to wait for an official response on that one.
Anyone have any other ideas? Adrian, Alex?
Thanks!
1) The message says all are deleted but only 25 of the requested ones were - both cannot be correct.
2) It appears the purge messages function is intended to be a global function to be used for example if an admin wants to delete everyones trash. Somehow I doubt it is intended behavior to limit it to 25 deletions at a time. At that rate it will take 40 trys to delete just 1000 messages. Imagine if one had to delete 10,000 trash messages it would take 400 trys!
As far as why it locks up when over 1000 are purged, it could be a server resource issue but without looking at the code I am not sure how it is done so we'll have to wait for an official response on that one.
Anyone have any other ideas? Adrian, Alex?
Thanks!
Aug 12, 2002, 3:06 PM
Staff (4101 posts)
Aug 12, 2002, 3:06 PM
Post #4 of 17
Views: 7928
Sorry it took so long to reply, but I took a look at the problem and I've got a fix for you. If you open up admin/GMail/Admin/Purge.pm, and go to line ~26, you'll see:
my $cgi = $IN->get_hash;Change that to be (well, add in that line):
$IN->delete('action');
my $cgi = $IN->get_hash;And it should fix the purge problem.
Adrian
Code:
$IN->delete('do'); my $cgi = $IN->get_hash;
Code:
$IN->delete('do'); $IN->delete('action');
my $cgi = $IN->get_hash;
Adrian
Aug 12, 2002, 5:39 PM
Novice (41 posts)
Aug 12, 2002, 5:39 PM
Post #5 of 17
Views: 7970
Hi, thanks for looking into it. I could not find the code around line 26 but did find it around 140 and applied the change as you specified but unfortunately it is still acting the same on 2.1.0. That is it is only deleting 25 at a time even though it reports back that all are deleted when I try to purge everyones trash. I did see the following code around 257 ...
$cgi->{mh} ||= 25;
Any other ideas?
$cgi->{mh} ||= 25;
Any other ideas?
Aug 13, 2002, 8:28 AM
Novice (41 posts)
Aug 13, 2002, 8:28 AM
Post #7 of 17
Views: 7934
Well I have GMail 2.1.0 and the version info for Purge.pm is below ...
# CVS Info : 087,069,080,087,083
# Revision : $Id: Purge.pm,v 1.10 2001/09/19 23:04:51 sbeck Exp $
It contains the following on lines 140 and 141
140 $IN->delete('do');
141 my $cgi = $IN->get_hash;
I changed it to ...
140 $IN->delete('do');
141 $IN->delete('action');
142 my $cgi = $IN->get_hash;
There is no such code on line 148 in my version but in any case, I think I changed the code you were refering to and it did not fix it. Since it is deleting only 25 at a time I thought it might have something to do with the code I posted before ...
$cgi->{mh} ||= 25;
.. which appears in the sub _build_query_cond section What do you think?
# CVS Info : 087,069,080,087,083
# Revision : $Id: Purge.pm,v 1.10 2001/09/19 23:04:51 sbeck Exp $
It contains the following on lines 140 and 141
140 $IN->delete('do');
141 my $cgi = $IN->get_hash;
I changed it to ...
140 $IN->delete('do');
141 $IN->delete('action');
142 my $cgi = $IN->get_hash;
There is no such code on line 148 in my version but in any case, I think I changed the code you were refering to and it did not fix it. Since it is deleting only 25 at a time I thought it might have something to do with the code I posted before ...
$cgi->{mh} ||= 25;
.. which appears in the sub _build_query_cond section What do you think?
Aug 23, 2002, 12:39 AM
Novice (41 posts)
Aug 23, 2002, 12:39 AM
Post #10 of 17
Views: 7903
I am trying to purge all users messages that are in their trash folder using the "Purge Messages" page in the "Users" section. The only selection I make on that page is I select the trash folder. It finds say 1000s and asks if I want to delete them. I say yes and it reports back all are deleted. Problem is all are not deleted - only 25. The reason I know this is that:
1) I check the message statistics and it shows only 25 less than before the purge.
2) I repeat the process and it finds 25 less than the last time I tried - it should find none if it actually deleted them all like its says it did.
Hope this help you to understand what it is doing wrong.
1) I check the message statistics and it shows only 25 less than before the purge.
2) I repeat the process and it finds 25 less than the last time I tried - it should find none if it actually deleted them all like its says it did.
Hope this help you to understand what it is doing wrong.
Aug 25, 2002, 11:58 PM
Novice (41 posts)
Aug 25, 2002, 11:58 PM
Post #12 of 17
Views: 7849
Thanks but it did not help. It still reports back all are deleted, yet only 25 actually are. Is it possible $mh is not getting set earlier in the code for some reason and thus it is defaulting to 25? All I am selecting on the form before I submit the page is the Trash folder from the drop down menu - nothing else - then I click the Yes link on the subsequent page. Do I need to select anything else in that form in order for $mh to get set properly?