Mass email sending problem

Dear Sir/Ma’am,

I have thousands of user accounts in my OJS website. When I published the new issue and create a new announcement. Then, my hosting account is going to suspend, by the reason sending large number of emails. I have read some question/answer in the OJS forum for the such kinds of issue. And I found some trick for fixing this problem. And I have also disable the following code. But I’m not confident it’s working or not. My hosting provider treating me for this issue.

classes/controllers/grid/issues/IssueGridHandler.inc.php

	// Send a notification to associated users
	//import('classes.notification.NotificationManager');
	//$notificationManager = new NotificationManager();
	//$notificationUsers = array();
	//$userGroupDao = DAORegistry::getDAO('UserGroupDAO');
	//$allUsers = $userGroupDao->getUsersByContextId($journalId);
	//while ($user = $allUsers->next()) {
		//$notificationUsers[] = array('id' => $user->getId());
	//}
	//foreach ($notificationUsers as $userRole) {
		//$notificationManager->createNotification(
			//$request, $userRole['id'], NOTIFICATION_TYPE_PUBLISHED_ISSUE,
			//$journalId
		//);
	//}
	//$notificationManager->sendToMailingList($request,
		//$notificationManager->createNotification(
			//$request, UNSUBSCRIBED_USER_NOTIFICATION, NOTIFICATION_TYPE_PUBLISHED_ISSUE,
			//$journalId
		//)
	//);

Please suggest me.

Thanking you !!

Regards,
Suresh Rijal

Hi @sureshrijal,

What version of OJS are you using? Please include this in your posts.

Did your host provide information on the emails that were went, e.g. subject lines? That would be helpful in order to ensure that you’re targeting the right part of the code.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi everyone.
I was looking for a solution about the same (I suppose) problem but I do not see any more notifications from the author, so I would write here instead of start a new topic.
Please let me know if I should do differently.
I use OJS 2.4.8.0 version.
As Editor, I click on “Notify Issue” and select the first option “Send this message to all users associated with this journal” (1337 users in that case).
After a while, I receive the following advice:
"“Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.”

I searched into the error log and found out these texts maybe helpful in understanding; consider that 3th April was the day of the notification, so I report here only that part of the log:


[Mon Apr 03 11:16:59 2017] [warn] [client 151.100.51.130] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: http://periodicodimineralogia.it/index.php/mineralogia/editor/notifyUsers
[Mon Apr 03 11:16:59 2017] [warn] [client 151.100.51.130] (104)Connection reset by peer: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function, referer: http://periodicodimineralogia.it/index.php/mineralogia/editor/notifyUsers
[Mon Apr 03 11:32:43 2017] [warn] [client 151.100.51.130] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: http://periodicodimineralogia.it/index.php/mineralogia/editor/notifyUsers
[Mon Apr 03 11:32:43 2017] [warn] [client 151.100.51.130] (104)Connection reset by peer: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function, referer: http://periodicodimineralogia.it/index.php/mineralogia/editor/notifyUsers
[Mon Apr 03 11:41:22 2017] [warn] [client 151.100.51.130] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: http://periodicodimineralogia.it/index.php/mineralogia/editor/notifyUsers
[Mon Apr 03 11:41:22 2017] [warn] [client 151.100.51.130] (104)Connection reset by peer: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function, referer: http://periodicodimineralogia.it/index.php/mineralogia/editor/notifyUsers


It seems to me some kind of problem with the FastCGI server but I do not know what it is =(
Does anyone know anything about it?
Thanks a lot =)

Chiara - Nuova Cultura

Hi @NuovaCultura,

It’s hard to guess from those messages – there may be more in another log that are from the FastCGI daemon – but I’d guess that there’s a limit configured for FastCGI execution times.

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you very much, Alec.
Do you think there would be any way to edit (expand?) the limit configured for FastCGI?
I searched a lot online but I did not find… at least, anything that I can understand (I am not an analyst, code and all that stuff is really hard for me to understand).

Otherwise could I split the amount of mails to send, in order to send for example 200 notification at a time and “bypassing” the obstacle?

Thank you again =)

Chiara - Nuova Cultura

Do you have a system administrator or hosting provider who could help you with the technicalities of FastCGI? I don’t personally use it, and it is a little out of scope for this forum.

From an OJS 2.4.8 perspective, sending a notification to a large number of users will involve a long loop of either local mail connections or SMTP connections (depending on your choices in config.inc.php), without interaction to the end user. Depending on available resources, this could depend on timeouts for PHP, timeouts for your server (Apache, IIS, FastCGI module, etc), or network/firewall timeouts.

Thank you very much for your support in that matter,@ctgraham and everyone involved in that case; I will contact my hosting provider, hoping to get some informations =)
By the way, do you know what is the number limit of “sending notifications”?
I will let you know if something new happens.
Best Regards =)

Chiara - Nuova Cultura

My reading is that there is no upper limit to the number of users selected in a notification (aside from the number of users on the system), but that notifications are sent 10 at a time: