• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Strange SocketException: "No buffer space available"

 
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have set up a server socket that accepts a connection of a single specific client socket to exchange information. The client sends data to the server, the server only sends heartbeat messages back to the client.
At a certain moment there was a problem...



I have no clue what happened and the message "No buffer space available - exhausted attempts to queue buffer" does not help me much.
After the first exception, the client socket is closed. From then on, every client attempt to reconnect results in the second exception.
Anybody who can explain what is going on?
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Bart
I guess too many tcp connections are open and thus the buffer space is full. Each time a heartbeat is sent , probably you are opening a new connection and its never closed. See if this helps!!
 
bart zagers
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the suggestion,
but I do not think that that is it. I'm "playing" server and use the already open connection to the client. I went through the code to make sure of this and checked the current port usage (it is currently already running longer than when it went wrong, it was about 24 hours) and that seems normal, one single connection open to the client machine.
 
Hoo hoo hoo! Looks like we got a live one! Here, wave this tiny ad at it:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic