Multiple instances run when process queue runs

Hello Team

Thank you for making such a beautiful mailing software.
Recently i had updated the following file from the GIT source of phplist as my mails were being regarded as spam by gmail. The file that i had updated was sendmaillib.php.
After updating the file the mails are going smoothly through inbox but when the processqueue is run via web browser then i notice that multiple instances of the same is running and the domain gets suspended as i am running the same on the shared hosting. The same is running smoothly when the job is executed by cron jobs., I havent changed any sort of coding in the file and the file is in its original form. .
Request you to help me up with the same.

If you need the screenshot of the same i can provide the same.

the exact file that i copied is this one from phplist 3. files
/phpList/phplist3/blob/master/public_html/lists/admin/sendemaillib.php

@ag1234 You should use either a cron job or send through the browser, but not try to use both at different times. The two behave slightly differently in regard to batch settings. You can remove the menu item to process the queue with this line in your config file

# If you set up your system to send the message automatically (from commandline), 
# you can set this value to 0, so "Process Queue" will disappear from the site
# this will also stop users from loading the page on the web frontend, so you will
# have to make sure that you run the queue from the commandline
# check README.commandline how to do this
define ("MANUALLY_PROCESS_QUEUE",1);

Change the 1 to 0.

hii
Thanks for the quick reply. Confirmed the config file did has this option enabled i forgot to change that one. I have set it as 0 for now.
But the question still remains that why there we multiple instances running instances for process queue as the same was done before setting the cron job.

I don’t understand this. What were you looking at to give you this impression?

I guess that these are not active processes and the process is not terminating in a timely way.

When you use the browser to process the queue, phplist runs for only one minute, then some javascript refreshes the page, which means there are multiple processes created. Possibly your batch settings are making the process wait a long time until exiting.

I am into the process of integrating the same with the smtp settings of the sendgrid account.
Yes the batch size was kept at a higher side as there is a difference in the way phplist is sending the mails with attribute selection.

I have a large database. Earlier while sending the emails with phplist V2, when the stacked attribute was applied then before sending the mails the emails id’s were selected matching the criteria and then only those emails were send, and with phplist V3 its the other way around. it sends to the whole list checking with the criteria whether it fulfills the attribute values or not, and if it is not matching phplist skips it. I have people preferences where in they want 1 email per month so i need to look at that too, so that was why i had kept batch size on a higher limit so that the list is completed in a day.

also i have noted that there are few lines in the config file which says, if i am not wrong these these lines should help me out with the problem that i have. I have used the same too but phplist did not send any email. where as around 4000 mails should have been send with the stacked attribute selection.

## message queue prepare
# this option will handle the sending of the queue a little bit differently
# it assumes running the queue many times in small batches
# the first run will find all subscribers that need to receive a campaign and mark them all
# as "todo" in the database. Subsequent calls will then work through the "todo" list and
# send them. This can be useful if the SQL query to find subscribers for a campaign is slow
# which is the case when your database is filling up.
# set to 1 to use
#define('MESSAGEQUEUE_PREPARE', 0);