0

I have a C++ application that accepts TCP connections from client applications.

After a seemingly random time of running fine (days), it stops receiving followup messages from the clients and only sees the first message on each TCP connection. After a re-start all is fine again.

The trouble is, this only happens on the production server where I have to restart is as soon as it gets stuck and I have been uanble to reproduce this on a lab machine. None of the socket operations seems to return an error, that I would see in my logfile and the application is huge so I can't just post the relevant part here.

First messages keep coming through all the time, only subsequent messages aren't received after a while. Even when my application stops receiving the followup-messages, I can see them comming in with Wireshark.

Any ideas how I might find out what is happening ? What should I be looking for ?

4

1 回答 1

1

这里使用了任何配置设置?过去,我在服务器上设置了一个条件,即在处理 50,000 条消息后忽略消息。这是为了防止开发中的失控情况。此代码有一次上线,但未将配置设置更改为“允许无限消息”。结果与您描述的完全一样,2-3 天正常,然后消息发送正常,但只是被忽略,没有任何错误。

这可能不是这里的情况,但我提到它作为您可能需要查看的示例。

于 2012-08-24T08:22:08.700 回答