Gateway timeout 504 on sending emails via NSPro

3 years 2 months ago #1 by Jörgen
Hello
I am using Newsletter Subscriber Pro 2.4.587 on Joomla 3.8.3 and can not seem to finish sending a newsletter in one go. My host (Siteground) limits the sending of emails to 400 emails per hour (min 9 s pause) so I set this up:
Sending delay: 15 s
Emails per send: 1
Newsletter max time limit: 0
No cron jobs or similar.

Smtp, port 465, SSL/TLS, SMTP autentication, password

I have a testlist with six mail addresses
After approx four emails I get 504 gateway timeout. (15 s timestamp between each mail)

If I complete sending the newsletter sending the last two mails I get a new gateway timeout (15 second between the two last emails)

This makes sending of 800 emails a difficult task, I have to resending and resending until it is finished. I suspect this has something to do with how open sql connections are handled during the wait time in the sleep call.

Has anyone else experienced this ?

I have used the SMTP configuration for several years and sending emails does not seem to be an issue. All of the emails are beeing sent, I just have to resend the newsletter a lot of times before it is done.

I have tried other combinations, 1 s delay between emails, but with similar results, gateway timeout after some time.

Jörgen @ Kreativ Fotografi

Please Log in or Create an account to join the conversation.

3 years 2 months ago - 3 years 2 months ago #2 by Christopher Mavros
Replied by Christopher Mavros on topic Gateway timeout 504 on sending emails via NSPro
Hello Jörgen and thank you for posting.

You have configured everything very well. However, with a minimum pause of 9 seconds, you don't really need to set the Newsletter Sending Delay to 15s. 10 seconds would be enough.

The Emails Per Send defines the number of emails sent, each time you click "Send". So, if you set it to 1, only 1 email will be sent. You can set it to 400, since that is your hourly limit, or even better to 200, so that you also enable our semihourly cron job. You can enable it here:
https://mavrosxristoforos.com/cron-job-key-generator

After configuring your Cron Job key, you will be able to schedule a newsletter and not worry about it being sent. Configure your time delay to 10 seconds, your Emails Per Send to 200 or 190 (in case other emails are generated by your site) and schedule the newsletter to be sent.

If you still face 504 timeouts, you may want to ask Siteground about it and what can you do to avoid it.

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

3 years 2 months ago #3 by Jörgen
Hello,
Thanks for the reply, Yes I understand that I can change the paraneters, but increasing nr of emails sent or decreasing delay does not make this work.I have tried with different settings. Setting delay to 9 is tested and will seem to create a gateway 504 time out with a list of 6 only emails. Setting delay to 0 gets amessage from Siteground that I am sending more than 14 emails per second and it crashes again. I can not see why this should work if use a cron as a scheduler.
Any thoughts ? A Siteground GoGeek account is supposed to be working good with Joomla.

regards
Jörgen @ Kreativ Fotografi

Please Log in or Create an account to join the conversation.

3 years 2 months ago #4 by Christopher Mavros
Replied by Christopher Mavros on topic Gateway timeout 504 on sending emails via NSPro
I understand.
Where exactly do you get the 504 timeouts?
Can we see a few screenshots or have a temporary administrator account?

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

3 years 2 months ago #5 by Jörgen
Hello

Here are some screenshots, if You need login I will arrange that.

1. Waiting for timeout



2. Timeout



3. Using backbutton in browser, after timeout


Jörgen @ Kreativ Fotografi

This message has attachments images.
Please log in or register to see it.

Please Log in or Create an account to join the conversation.

3 years 2 months ago #6 by Christopher Mavros
Replied by Christopher Mavros on topic Gateway timeout 504 on sending emails via NSPro
Alright. As far as I can see, the messages are being sent as you mentioned. The only problem is that the usual redirection message page shows a 504 instead. If you haven't used NS Pro before, then let me tell you that this page only shows a message, and initiates the sending process, which then continues regardless of what you see, and follows the rules we already discussed.

So, yes, please send me a super admin at mavrosxristoforos@gmail.com, so that I can install a test version to see what the problem is.
If you find a PHP error log, that would be also helpful to send.

Thanks again

Christopher Mavros
mavrosxristoforos@gmail.com
If you like our extensions, please rate us on the JED!

Please Log in or Create an account to join the conversation.

Moderators: Christopher Mavros