Closed (won't fix)
Project:
Privatemsg
Version:
5.x-1.7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Nov 2007 at 10:09 UTC
Updated:
30 Oct 2009 at 09:14 UTC
if you've got ALOT of users with unread private messages (and i do! > 3000!), privatemsg_cron will kill cron.
all those user_loads eventually add up to pain.
since the privatemsg_last_cron variable isn't set until *after* _privatemsg_mailalert is run successfully, the private_msg cron runs on *each* cron run. some users get notified over and over again. others never get notified.
short term solution - set the last_cron variable before running prune and mailalert. at least only one cron per day has to suffer now.
long term solution - privatemsg should store its user prefs in a separate table so that it doesn't need to call user_load on each user to check prefs.
Comments
Comment #1
firebus commentedi wonder if it would be enough to call unset($user) at the end of the while($alert =... block to keep memory from getting used up...
Comment #2
berdirI'm closing old issues, 5.x-1.8 is not supported anymore, I apologize for pinging the participiants.