Hi all,
In /admin/settings/actions I have an action "send email" for the trigger "After saving a new comment" so when a new comment is posted I get an email alert. This has always worked fine but recently I have started to get email alerts and then when I look there is no new comment. When I look at recent hits /admin/reports/hits I can see that there is a page visit which corresponds to the "new comment email" ie something like comment/reply/186 which suggests that someone is writing a comment.
Other than me there is only one other user who has permission to delete comments and I can see that they have not logged in at the relevant time.
I get quite a lot of spam comments which are automatically deleted by Mollom. Previously a comment deleted by Mollom would not pull the "After saving a new comment" trigger ie deleted by Mollom = not published = new comment email not triggered.
I have posted about six test comments myself as an anonymous user and everything works ok. I guess it could be a coincidence but one user mentioned that they had to post a comment twice because the first time it disappeared.
So I think the possibilities are:
1) there is no new comment and the "After saving a new comment" trigger is somehow malfunctioning.
2) there is a new comment (so the trigger works ok) but the comment is somehow not saving.
3) there is a new comment (so the trigger works ok) but it is spam which is getting deleted by Mollom but somehow triggering the "After saving a new comment" email.
Any suggestions please?
Thanks...
Comments
My first suspicion would be
My first suspicion would be that saving to the database is timing out or failing owing to insufficient server resources, especially if this is happening when the server is busy. I would look at server performance. If you are shared hosting that would be down to the hosting company of course.
Digit Professionals
@ John_B thanks for your
@ John_B thanks for your reply. It is a VPS - I think that CPU, memory and traffic are ok so is there anything else that would come under "insufficient server resources"? It might be a coincidence but I have seen this warning about twice recently. I am not sure what the "max_allowed_packet" value in /etc/mysql/my.cnf should be - it is currently 3M.
Thanks...
I would increase the
I would increase the max_allowed_packet. I cannot say to what, 8M might be a good start. Some people use much more. The whole question of mysql setup is tricky, but very important if you are limited for memory (and in my experience with a Drupal site on a VPS of anything below 2GB RAM one is juggling with how much memory to allow to mysql native caching, how much to allocate to an object cache such as APC if enabled etc.).
Quite often database write fails seem to be related to a bottleneck on disk IO, on which Drupal can place heavy demands, rather than memory for executing your code. This is pretty much out of our hands when we are running VPSs. On an expensive VPS like Linode it is normally OK, on some cheaper ones it is possible to suffer when sharing a disk array with another VPS owner who may from time to time time abuse / overuse their server.
I might add that I was one of those complaining about a horrendously high level of false positives on Mollom (before I gave up on it). There is a big thread on this in the issue queue for Mollom module. A Mollom maintainer contributed, but ultimately they never really fixed it. However, your problem sounds different.
Digit Professionals