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

firebus’s picture

i 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...

berdir’s picture

Status: Active » Closed (won't fix)

I'm closing old issues, 5.x-1.8 is not supported anymore, I apologize for pinging the participiants.