[QFJ-897] AbstractSocketAcceptor does not stop its internal IoAcceptors correctly Created: 11/Jul/16 Updated: 13/Dec/16 Resolved: 11/Jul/16 |
|
| Status: | Closed |
| Project: | QuickFIX/J |
| Component/s: | Engine |
| Affects Version/s: | 1.6.2 |
| Fix Version/s: | 1.6.3 |
| Type: | Bug | Priority: | Default |
| Reporter: | Uwe Guenther | Assignee: | Uwe Guenther |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | QuickfixJ | ||
| Environment: |
Linux |
||
| Attachments: |
|
| Description |
|
We having a productive setup where we are reuse sessions and create, start, stop ThreadedSocketAcceptor as we need them. We do not reuse them. In Prod we saw the following problem: We were running out of file descriptors on ore 32 CPU Linux box with a max open file desriptor settings of 4096 after several days running around 20 quickfixj sessions within one JVM. Issue: Solution:
protected void stopAcceptingConnections() throws ConfigError {
Iterator<IoAcceptor> ioIt = ioAcceptors.values().iterator();
while (ioIt.hasNext()) {
IoAcceptor ioAcceptor = ioIt.next();
SocketAddress localAddress = ioAcceptor.getLocalAddress();
ioAcceptor.unbind();
ioAcceptor.dispose(true);
log.info("No longer accepting connections on " + localAddress);
ioIt.remove();
}
}
|
| Comments |
| Comment by Uwe Guenther [ 11/Jul/16 ] |
|
if you MyThreadedSocketAcceptor.java instead of ThreadedSocketAcceptor.java you can work around this issue. |
| Comment by Christoph John [ 11/Jul/16 ] |
|
Hi Uwe, thanks for the report and suggested fix. |
| Comment by Uwe Guenther [ 11/Jul/16 ] |
|
Hi Chris, you are welcome! Is there a release plan for 1.6.3? Cheers Uwe |