我有一个Visual Studio C#JMS应用程序,它将消息发送到WebLogic队列。该程序正在工作,并且在多线程处理时工作,直到线程数超过6.如果我运行最多6个线程,它可以正常运行,但是7个或更多线程会导致以下异常:
WebLogic.Messaging.Transport.TransportException: Server host/port can not be reached -
An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full
at WebLogic.Messaging.Physical.T3TransportFactory.CreateT3Transport(String host, Int32 port, TransportUserCfgParameters paras)
at WebLogic.Messaging.Physical.T3TransportFactory.CreateT3Transport(IDictionary`2 paramMap)
WebLogic.Messaging.Transport.TransportException: Server host/port can not be reached -
An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full
at WebLogic.Messaging.Physical.T3TransportFactory.CreateT3Transport(String host, Int32 port, TransportUserCfgParameters paras)
at WebLogic.Messaging.Physical.T3TransportFactory.CreateT3Transport(IDictionary`2 paramMap)
队列永远不会满,消息的消耗速度比发送的速度快。每条消息都小于1Kb。
由于
答案 0 :(得分:0)
每次发送邮件时创建上下文都超过了允许的网络连接数。使用仅创建单个网络连接的共享上下文解决了该问题。请参阅Oracle文档,Oracle融合中间件,使用适用于Microsoft WebLogic Server的WebLogic JMS客户端"了解套接字和线程行为"。