Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8084181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:42:37+00:00 2026-06-05T17:42:37+00:00

I’m Running Tomcat7 on a server (right now it’s a virtual machine but should

  • 0

I’m Running Tomcat7 on a server (right now it’s a virtual machine but should be configured as unlimited connexions).

I have connexions with a SMTP server and also with facebook Servers.
My traffic is around 250hits/mins.

I’m running djabberd with around a few hundreds connected users average time.

Sometimes I get :

javax.mail.MessagingException: Could not connect to SMTP host: xxx.xxx.xxx.xxx, port: xxxxx;
  nested exception is:
    java.net.SocketException: No buffer space available
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
    at javax.mail.Service.connect(Service.java:295)
    at javax.mail.Service.connect(Service.java:176)
    at javax.mail.Service.connect(Service.java:125)
    at javax.mail.Transport.send0(Transport.java:194)
    at javax.mail.Transport.send(Transport.java:124)
    at xxxxxxxxxxxxxxxx.controllers.EmailManager.sendEmail(EmailManager.java:151)

Or same error connecting to facebook servers.

netstat -n | wc -l 
348

Tomcat can accept acceptCount=”1024″ connexions.

Where should I investigate ?

[UPDATE 1]

Send an email :

Context envContext = (Context) initContext.lookup("java:/comp/env");
session = (javax.mail.Session) envContext.lookup("mail/emailSession");

MimeMessage message = new MimeMessage(session);
//....
Transport.send(message);

Configuration :

<resource-ref>
        <description>
            JNDI javamail session resource reference
        </description>
        <res-ref-name>mail/emailSession</res-ref-name>
        <res-type>javax.mail.Session</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>

Facebook connexion :

FacebookClient facebookClient = new DefaultFacebookClient(accessToken);
User user = facebookClient.fetchObject("me", User.class);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T17:42:38+00:00Added an answer on June 5, 2026 at 5:42 pm

    What OS? Linux? You are probably hitting the limit on the max number of client sockets, there is no such thing as unlimited connections. Either somewhere in your app you aren’t closing the connections or you just have too many open. “Too many” may be a lot lower than you think because it is limited by the max number of file descriptors a process can have open. If you are running Linux, take a look at http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.