java.net.SocketException: Too many open files. Failed messages: javax.mail.MessagingException: Could not connect to SMTP host: smtp.uchicago.edu, port: 25 error when running notices

Notes

When notices run, we are receiving the following stack trace. Maybe it is opening too many files and not closing them?

Java stack trace (for programmers):
----------
freemarker.core._MiscTemplateException: [... Exception message was already printed; see it above ...]
at freemarker.core.LibraryLoad.accept(LibraryLoad.java:114)
at freemarker.core.Environment.visit(Environment.java:265)
at freemarker.core.MixedContent.accept(MixedContent.java:93)
at freemarker.core.Environment.visit(Environment.java:265)
at freemarker.core.Environment.process(Environment.java:243)
at freemarker.template.Template.process(Template.java:277)
at org.kuali.ole.deliver.service.NoticeMailContentFormatter.generateHTML(NoticeMailContentFormatter.java:201)
at org.kuali.ole.deliver.service.NoticeMailContentFormatter.generateMailContentForPatron(NoticeMailContentFormatter.java:64)
at org.kuali.ole.deliver.service.CourtesyNoticesExecutor.generateMailContent(CourtesyNoticesExecutor.java:108)
at org.kuali.ole.deliver.notice.executors.LoanNoticesExecutor.run(LoanNoticesExecutor.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: freemarker.core.ParseException: Parsing error in template "itemInfo.ftl" in line 196, column 1:
Unclosed #if when the end of the file was reached.
at freemarker.core.FMParser.generateParseException(FMParser.java:4740)
at freemarker.core.FMParser.jj_consume_token(FMParser.java:4611)
at freemarker.core.FMParser.If(FMParser.java:1208)
at freemarker.core.FMParser.FreemarkerDirective(FMParser.java:2375)
at freemarker.core.FMParser.Content(FMParser.java:2631)
at freemarker.core.FMParser.OptionalBlock(FMParser.java:2803)
at freemarker.core.FMParser.Case(FMParser.java:2289)
at freemarker.core.FMParser.Switch(FMParser.java:2238)
at freemarker.core.FMParser.FreemarkerDirective(FMParser.java:2426)
at freemarker.core.FMParser.Content(FMParser.java:2631)
at freemarker.core.FMParser.OptionalBlock(FMParser.java:2803)
at freemarker.core.FMParser.List(FMParser.java:1260)
at freemarker.core.FMParser.FreemarkerDirective(FMParser.java:2378)
at freemarker.core.FMParser.Content(FMParser.java:2631)
at freemarker.core.FMParser.OptionalBlock(FMParser.java:2803)
at freemarker.core.FMParser.If(FMParser.java:1174)
at freemarker.core.FMParser.FreemarkerDirective(FMParser.java:2375)
at freemarker.core.FMParser.Content(FMParser.java:2631)
at freemarker.core.FMParser.OptionalBlock(FMParser.java:2803)
at freemarker.core.FMParser.Macro(FMParser.java:1827)
at freemarker.core.FMParser.FreemarkerDirective(FMParser.java:2396)
at freemarker.core.FMParser.Content(FMParser.java:2631)
at freemarker.core.FMParser.OptionalBlock(FMParser.java:2803)
at freemarker.core.FMParser.Root(FMParser.java:2975)
at freemarker.template.Template.<init>(Template.java:193)
at freemarker.cache.TemplateCache.loadTemplate(TemplateCache.java:419)
at freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:330)
at freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:205)
at freemarker.template.Configuration.getTemplate(Configuration.java:740)
at freemarker.core.Environment.getTemplateForInclusion(Environment.java:1694)
at freemarker.core.Environment.getTemplateForImporting(Environment.java:1748)
at freemarker.core.LibraryLoad.accept(LibraryLoad.java:111)
... 12 more
2018-03-22 01:19:41,704 [pool-19917-thread-7] u:/d: ERROR org.kuali.incubator.SolrRequestReponseHandler :: Error while updating document to solr.
2018-03-22 01:19:41,962 [pool-19917-thread-2] u:/d: ERROR org.kuali.incubator.SolrRequestReponseHandler :: Error while updating document to solr.
2018-03-22 01:19:42,378 [pool-19917-thread-3] u:/d: ERROR org.kuali.incubator.SolrRequestReponseHandler :: Error while updating document to solr.
2018-03-22 01:19:57,321 [pool-19917-thread-9] u:/d: ERROR org.kuali.incubator.SolrRequestReponseHandler :: Error while updating document to solr.
2018-03-22 01:20:00,372 [pool-19917-thread-10] u:/d: ERROR org.kuali.incubator.SolrRequestReponseHandler :: Error while updating document to solr.
2018-03-22 01:20:00,751 [pool-19917-thread-6] u:/d: ERROR org.kuali.rice.core.mail.MailerImpl :: sendMessage():
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.Messag
at javax.mail.Service.connect(Service.java:295)
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:389)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:336)
at org.kuali.rice.core.mail.MailerImpl.sendMessage(MailerImpl.java:220)
at org.kuali.ole.deliver.batch.OleMailer.sendEmail(OleMailer.java:109)
at org.kuali.ole.deliver.service.NoticesExecutor.sendMailsToPatron(NoticesExecutor.java:218)
at org.kuali.ole.deliver.notice.executors.LoanNoticesExecutor.sendMail(LoanNoticesExecutor.java:109)
at org.kuali.ole.deliver.notice.executors.LoanNoticesExecutor.run(LoanNoticesExecutor.java:68)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketException: Too many open files
at java.net.Socket.createImpl(Socket.java:460)
at java.net.Socket.connect(Socket.java:587)
at java.net.Socket.connect(Socket.java:538)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:288)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:231)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)
... 13 more
2018-03-22 01:20:00,752 [pool-19917-thread-6] u:/d: ERROR org.kuali.ole.deliver.batch.OleMailer :: Exception occured while sending the mail : org.springframework.mail.MailSendException: Mail server connection
failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: smtp.uchicago.edu, port: 25;
nested exception is:
java.net.SocketException: Too many open files. Failed messages: javax.mail.MessagingException: Could not connect to SMTP host: smtp.uchicago.edu, port: 25;
nested exception is:
java.net.SocketException: Too many open files; message exceptions (1) are:
Failed message 1: javax.mail.MessagingException: Could not connect to SMTP host: smtp.uchicago.edu, port: 25;
nested exception is:
java.net.SocketException: Too many open files

Assignee

Suresh Subramanian

Reporter

Jon Miller

Labels

None

Priority By Function

None

Solr Version

None

Work Group

None

Process &amp; Sub-Process

None

Parent Jira

None

Co-Assignee/s

None

Due By

None

Contribution

No

Contributing Developer

None

Contributing Institution

None

Contribution Type

None

Value Proposition

None

Components

Fix versions

Priority

Blocker
Configure