Spring data mongodb nicht schließen mongodb-verbindungen

Bin ich mit spring-data-mongodb (1.7.0.RELEASE) mit spring-webmvc Rahmen für meine web-Anwendung. Ich bin mit grundlegenden CRUD-Funktionen, die mit mongoRepository ich bin aber nicht schließen mongo-Anschlüsse in meinem code, weil ich dachte, dass der Frühling-Daten-mongodb wird, schließen Sie von selbst, Aber es hält auf der Eröffnung von neuen verbindungen und nicht diese zu schließen. Diese zu viele verbindungen ares Absturz meiner Anwendung, und ich haben, starten Sie tomcat neu, wieder und wieder (zweimal am Tag), um diese zu überwinden.

Hinweis: Spring-Anwendung & mongod auf demselben server.
Dies ist das Logbuch nur nach Absturz -

    2015-07-17T01:31:20.068-0400 I NETWORK  [conn3645] end connection 127.0.0.1:55302 (2583 connections now open)
    2015-07-17T01:31:20.071-0400 I NETWORK  [conn1713] end connection 127.0.0.1:48174 (2352 connections now open)
    2015-07-17T01:31:20.072-0400 I NETWORK  [conn2250] end connection 127.0.0.1:51017 (2325 connections now open)
    2015-07-17T01:31:20.072-0400 I NETWORK  [conn2149] end connection 127.0.0.1:50670 (2320 connections now open)

Dies ist der log nach dem Neustart von tomcat

2015-07-17T01:31:29.994-0400 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:53599 #3984 (1 connection now open)
2015-07-17T01:31:33.263-0400 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:53740 #3985 (2 connections now open)
2015-07-17T01:31:33.580-0400 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:53750 #3986 (3 connections now open)
2015-07-17T02:10:06.477-0400 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:50086 #3987 (4 connections now open)
2015-07-17T02:10:06.590-0400 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:50090 #3988 (5 connections now open)
2015-07-17T02:10:11.682-0400 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:50242 #3989 (6 connections now open)
2015-07-17T02:10:11.780-0400 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:50244 #3990 (7 connections now open)
2015-07-17T02:10:12.545-0400 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:50255 #3991 (8 connections now open)
2015-07-17T02:10:12.605-0400 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:50258 #3992 (9 connections now open)
2015-07-17T02:10:13.413-0400 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:50299 #3993 (10 connections now open)

erhöhen, wenn ich sendet die Anfrage an den app.

- Und dies ist der tomcat-log direkt nach crash -

Jul 16, 2015 3:59:57 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run
SEVERE: Socket accept failed
java.net.SocketException: Too many open files
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:404)
    at java.net.ServerSocket.implAccept(ServerSocket.java:545)
    at java.net.ServerSocket.accept(ServerSocket.java:513)
    at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:60)
    at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:222)
    at java.lang.Thread.null(Unknown Source)

seine eine Entwicklung, server, traffic haben weniger als 10 anrufen pro minute.

Bitte jemand vorschlagen, wie sollte ich diese verbindungen ?

Haben Sie sich in die folgende Frage? stackoverflow.com/questions/13721115/...

InformationsquelleAutor Vivek | 2015-07-17

Schreibe einen Kommentar