xinge-api-java
xinge-api-java copied to clipboard
调用比较频繁,报错Too many open files
{"err_msg":"java.net.SocketException: Too many open files\n\tat java.net.Socket.createImpl(Socket.java:460)\n\tat java.net.Socket.getImpl(Socket.java:520)\n\tat java.net.Socket.setSoTimeout(Socket.java:1141)\n\tat okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:221)\n\tat okhttp3.internal.connection.RealConnection.connect(RealConnection.java:149)\n\tat okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:195)\n\tat okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:121)\n\tat okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:100)\n\tat okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)\n\tat okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)\n\tat okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)\n\tat okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)\n\tat okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)\n\tat okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)\n\tat okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)\n\tat okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)\n\tat okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)\n\tat okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)\n\tat okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)\n\tat okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)\n\tat okhttp3.RealCall.execute(RealCall.java:69)\n\tat com.tencent.xinge.XingeApp.callRestful(XingeApp.java:128)\n\tat com.tencent.xinge.XingeApp.pushApp(XingeApp.java:93)\n\tat com.cu.service.impl.XingePushServiceImpl.push(XingePushServiceImpl.java:25)\n\tat com.cu.component.PushReceiver.onAndroidPushMessage(PushReceiver.java:43)\n\tat sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:181)\n\tat org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:114)\n\tat org.springframework.amqp.rabbit.listener.adapter.HandlerAdapter.invoke(HandlerAdapter.java:51)\n\tat org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:188)\n\tat org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.onMessage(MessagingMessageListenerAdapter.java:126)\n\tat org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:1445)\n\tat org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.actualInvokeListener(AbstractMessageListenerContainer.java:1368)\n\tat org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:1355)\n\tat org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:1334)\n\tat org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:817)\n\tat org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:801)\n\tat org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$700(SimpleMessageListenerContainer.java:77)\n\tat org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1042)\n\tat java.lang.Thread.run(Thread.java:748)\n","ret_code":10100}
一个 appkey 创建一个 XingeApp 试试,内部用的是连接池,没暴露出来关闭方法
问题解决了吗?我也遇到同样问题