- Posts: 13643
- Thank you received: 2491
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
SMTP - Hanging and causing crashes.
- Marcike_247436
- Topic Author
- Visitor
3 years 6 months ago #206216
by Marcike_247436
SMTP - Hanging and causing crashes. was created by Marcike_247436
Hello - I have a 2.x LS installation that will eventually be upgraded but I need that version now.
The issue we are having is that using my SMTP server it will cause delays and the site to hang while sending about 7000 emails out. 1000 at a time.
Can anyone explain what the process is when LS is sending emails ?
I'm seeing on average it takes about 3 seconds to send each email. This is using a SMTP server that can easily bulk send 1000's of emails with no issue.
Does LS really send one email at a time ? With 7000 emails to go out that can take quite some time at 3 seconds each email.
The issue we are having is that using my SMTP server it will cause delays and the site to hang while sending about 7000 emails out. 1000 at a time.
Can anyone explain what the process is when LS is sending emails ?
I'm seeing on average it takes about 3 seconds to send each email. This is using a SMTP server that can easily bulk send 1000's of emails with no issue.
Does LS really send one email at a time ? With 7000 emails to go out that can take quite some time at 3 seconds each email.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
3 years 6 months ago #206223
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic SMTP - Hanging and causing crashes.
We send different email for each token : then need to send email one by one …
Else : SMPT connect authentication etc … if your network are bad : it can take time. Seems the case here.
Since your host yourself : you can use php mail fucntion to send to sendmail using your smtp server as relay.
Else : SMPT connect authentication etc … if your network are bad : it can take time. Seems the case here.
Since your host yourself : you can use php mail fucntion to send to sendmail using your smtp server as relay.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
3 years 6 months ago #206226
by jelo
forums.limesurvey.org/forum/installation...-for-multiple-emails
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic SMTP - Hanging and causing crashes.
I recommend to look at this thread. The mail handling in your version of LimeSurvey might close the SMTP connection after each email too.maestro1315 wrote: Can anyone explain what the process is when LS is sending emails ?
I'm seeing on average it takes about 3 seconds to send each email. This is using a SMTP server that can easily bulk send 1000's of emails with no issue.
forums.limesurvey.org/forum/installation...-for-multiple-emails
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
3 years 6 months ago #206227
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic SMTP - Hanging and causing crashes.
That's no technical restriction by the environment but by the current code. It should be possible to create 10 emails with different content and then send 10 via one smtp connection too. There might be other restrictions like memoryusage or crashrisk which is lower with the current concept doing it 1 by 1.DenisChenu wrote: We send different email for each token : then need to send email one by one …
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- Marcike_247436
- Topic Author
- Visitor
3 years 6 months ago #206261
by Marcike_247436
Replied by Marcike_247436 on topic SMTP - Hanging and causing crashes.
I see a delay on the SMTP side of things so I'm starting there. It takes on average 2-3 seconds to return Message Acceptance for each email, with 8k emails that's quite a bit. Is this typical ?
2020-10-06 13:01:14 CLIENT -> SERVER: .
2020-10-06 13:01:16 SERVER -> CLIENT: 250 ok: Message 10124444 accepted
2020-10-06 13:01:14 CLIENT -> SERVER: .
2020-10-06 13:01:16 SERVER -> CLIENT: 250 ok: Message 10124444 accepted
The topic has been locked.
- Marcike_247436
- Topic Author
- Visitor
3 years 6 months ago #206274
by Marcike_247436
Replied by Marcike_247436 on topic SMTP - Hanging and causing crashes.
This didn't appear to be the issue and is expected behavior (2-3 second delay).
The topic has been locked.
- Marcike_247436
- Topic Author
- Visitor
3 years 6 months ago #206275
by Marcike_247436
Replied by Marcike_247436 on topic SMTP - Hanging and causing crashes.
Is there a setting to change how long the LS website will wait for the SMTP emails to be sent. It will often stop and the site crashes and the user has to log in again and start sending from where it left off.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
3 years 6 months ago #206283
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic SMTP - Hanging and causing crashes.
LimeSurvey uses the phpmailer library. There are defaults value in the lib.
LS4
github.com/LimeSurvey/LimeSurvey/applica...pmailer/src/SMTP.php
In LimeSurvey 2.x you will need to search for the code parts.
LS4
github.com/LimeSurvey/LimeSurvey/applica...pmailer/src/SMTP.php
In LimeSurvey 2.x you will need to search for the code parts.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
3 years 6 months ago #206300
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic SMTP - Hanging and causing crashes.
LS 2 use PHPMailer withoiut way to upadte it.
But clearly … if need more than 5 minutes …
I thionk it's more in PHP settings ?
Maybe default_socket_timeout ?
But clearly … if need more than 5 minutes …
I thionk it's more in PHP settings ?
Maybe default_socket_timeout ?
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- Marcike_247436
- Topic Author
- Visitor
3 years 6 months ago #206427
by Marcike_247436
"Since your host yourself : you can use php mail fucntion to send to sendmail using your smtp server as relay."
This sounds like what I need to try. How do I go about making the changes ?
Are the changes
1) change to PHP on the admin console
2) edit php.ini ?
3) edit class.phpmailer.php ?
I'm not certain what needs to be configured in # 2 and 3.
My problem is that for some reason LS is no longer sending multiple concurrent emails. Past SMTP server logs show that it was so I'm not certain what changed. Would using PHPMail enable that again ?
Thanks !
Replied by Marcike_247436 on topic SMTP - Hanging and causing crashes.
DenisChenu wrote: We send different email for each token : then need to send email one by one …
Else : SMPT connect authentication etc … if your network are bad : it can take time. Seems the case here.
Since your host yourself : you can use php mail fucntion to send to sendmail using your smtp server as relay.
"Since your host yourself : you can use php mail fucntion to send to sendmail using your smtp server as relay."
This sounds like what I need to try. How do I go about making the changes ?
Are the changes
1) change to PHP on the admin console
2) edit php.ini ?
3) edit class.phpmailer.php ?
I'm not certain what needs to be configured in # 2 and 3.
My problem is that for some reason LS is no longer sending multiple concurrent emails. Past SMTP server logs show that it was so I'm not certain what changed. Would using PHPMail enable that again ?
Thanks !
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
3 years 6 months ago #206432
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic SMTP - Hanging and causing crashes.
Hi,
It's really an idea
php.ini use surely sendmail for sending email
you can configure sendmail to use another SMTP server
See serverfault.com/questions/779593/configu...ay-on-an-smtp-server
tecadmin.net/sendmail-to-relay-emails-through-gmail-stmp/
cri.ch/linux/docs/sk0009.html
…
Then : no waiting time.
It's not the best solution (in my opinion) but do the trick.
It's really an idea
php.ini use surely sendmail for sending email
you can configure sendmail to use another SMTP server
See serverfault.com/questions/779593/configu...ay-on-an-smtp-server
tecadmin.net/sendmail-to-relay-emails-through-gmail-stmp/
cri.ch/linux/docs/sk0009.html
…
Then : no waiting time.
It's not the best solution (in my opinion) but do the trick.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.