Ticket #5124 (closed Bugs: fixed)

Opened 6 years ago

Last modified 6 years ago

EMFILE handling

Reported by: olafvdspek@… Owned by: chris_kohlhoff
Milestone: Boost 1.47.0 Component: asio
Version: Boost 1.45.0 Severity: Problem
Keywords: Cc:


What is the recommended way to handle EMFILE on accept? The chat server example returns from the handler without doing a new accept, which means the server won't accept any new connections after hitting EMFILE. This is undesirable. I've just been bitten by this myself.

Would it be possible for Asio itself to handle this situation gracefully?


Change History

comment:1 Changed 6 years ago by anonymous

  • Owner set to chris_kohlhoff
  • Component changed from None to asio

comment:2 Changed 6 years ago by chris_kohlhoff

  • Status changed from new to closed
  • Resolution set to fixed

As of release branch [72428], examples have been updated to treat accept failures as non-fatal.

comment:3 Changed 6 years ago by Olaf van der Spek <olafvdspek@…>

Thanks. You might also want to use boost::make_shared instead of new.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.