-
-
Notifications
You must be signed in to change notification settings - Fork 268
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
Problem with stopping tomcat8 after mail send #73
Comments
I'm sorry, but how is this related to Simple Java Mail? I don't see any references to it. Also, why do you have 6 connection pools? |
@bbottema This happens only after I send an email. If you do not send, then there will be no such error. |
This happens right after sending the email? Or when you close Tomcat after sending the email? If you try to close the server while the email is still being processed in async mode, then there's ofcourse still a thread running. Might that be the case? If you share the code in a minimal version, I can try to reproduce it and analyse it, but as it is I don't have much to go on. Also include Tomcat version and Java version. |
@bbottema The message is sent and after a while I stop tomcat 8 and get this error. I use: Email class:
Send:
|
I think I know what the problem is. The connection pool that is started because of the async mode is never shut down, because Simple Java Mail cannot know when you are done sending emails. However, I'm making a change because of which the connection pool is shut down as soon as all known emails have been sent. If new emails are requested lateron, a new connection pool will be spinned up to once again send more emails. And so on. This way Simple Java Mail should never keep processes running anymore when sending of email is finished. |
…wn* async emails (later emails will run with a completely new connection pool)
I've release 4.2.2. Can you please try again? It might take some time to appear in maven central though (OSS Sonatype needs to sync to it first). |
Oh. it works. Thanks. |
I get this error in log after send mail:
To stop tomcat8 I need to call the stop command twice.
I use async sending.
The text was updated successfully, but these errors were encountered: