Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

503 Sender already specified #10

Closed
peffis opened this issue Feb 15, 2024 · 2 comments
Closed

503 Sender already specified #10

peffis opened this issue Feb 15, 2024 · 2 comments

Comments

@peffis
Copy link

peffis commented Feb 15, 2024

Sometimes, when there is a lot of sending going on I get a "503 Sender already specified" from pool.Send() when the pool has been instantiated with

pool, err := smtppool.New(smtppool.Opt{
                Host:            os.Getenv("SMTP_HOST"),
                Port:            587,
                MaxConns:        10,
                IdleTimeout:     time.Second * 10,
                PoolWaitTimeout: time.Second * 3,
                Auth: smtp.PlainAuth("",
                        os.Getenv("SMTP_USERNAME"),
                        os.Getenv("SMTP_PASSWORD"),
                        os.Getenv("SMTP_HOST")),
                TLSConfig: &tls.Config{ServerName: os.Getenv("SMTP_HOST")},
        })

There seems to be some race condition going on possibly where a connection gets used by a different send request and I wonder if this explains also knadh/listmonk#300 (although I am not using listmonk, only smtppool).

I only send to only one address, but there are many send requests coming in in parallel sometimes.

@peffis
Copy link
Author

peffis commented Feb 15, 2024

But I see also that there was a commit done - 6f93552
, which I am not using I think. Perhaps that is the fix actually and perhaps I should just upgrade

@knadh
Copy link
Owner

knadh commented Feb 15, 2024

Yep, this issue was fixed in the last release. Please upgrade.

@knadh knadh closed this as completed Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants