Gateway timeout 504 on sending emails via NSPro

  • Jörgen
  • Jörgen's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 11 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.

  • Christopher Mavros
  • Christopher Mavros's Avatar
  • Offline
  • Administrator
  • Administrator
More
7 years 11 months ago - 7 years 11 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://mavxr.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
me@mavxr.com
If you like our extensions, please rate us on the JED!
Last edit: 7 years 11 months ago by Christopher Mavros.

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

  • Jörgen
  • Jörgen's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 11 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.

  • Christopher Mavros
  • Christopher Mavros's Avatar
  • Offline
  • Administrator
  • Administrator
More
7 years 11 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
me@mavxr.com
If you like our extensions, please rate us on the JED!

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

  • Jörgen
  • Jörgen's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 11 months ago #5 by Jörgen
Hello

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

1. Waiting for timeout

This image is hidden for guests.
Please log in or register to see it.


2. Timeout

This image is hidden for guests.
Please log in or register to see it.


3. Using backbutton in browser, after timeout
This image is hidden for guests.
Please log in or register to see it.


Jörgen @ Kreativ Fotografi

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

  • Christopher Mavros
  • Christopher Mavros's Avatar
  • Offline
  • Administrator
  • Administrator
More
7 years 11 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 me@mavxr.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
me@mavxr.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