Client Server process always drops circa 10% of replies irrespective of load
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Client Server process always drops circa 10% of replies irrespective of load
Hi
We have a problem that has been puzzling us for two days solid. I'm just throwing it out in case someone has come across the issue before.
Platform: SuSE 8.1
A pthreaded program using worker threads has been written. It experiences the following problems on Linux:
When multiple clients connect simultaneously (as in hundreds or thousands) circa 90% of the clients send a query to the server and get a successful reply.
Whether it is a dozen or 100 or 1000 clients, the remaining (circa) 10% successfully send a query to the server, has the server process it and the server successfully replies - but the client never sees the reply.
This is irrespective of the number of threads run, irrespective of whether the number of clients is more or less than the number of threads run and irrespective of whether the clients are separate processes or threads of a separate client. The result is always the same.
Configuration:
SO_LINGER has been set and the size of the SO_RCVBUF and SO_SNDBUF have been increased. The effect is the same with Nagel on or off and there are sufficient file descriptors.
Already checked:
On the server all writes are checked for length and send with multiple writes when necessary.
All writes, flushes and closes are checked for errors and none have been reported.
Other information:
SSL encryption and decryption is involved.
It should also be noted that it is not a question of thread safety as that has been carefully checked.
We're baffled so any help or pointers people might have would be greatly appreciated,
What protocol: TCP or UDP packets?
When you say even the 'exceptions' replies do get sent from the server, are you checking inside the seerver or checking tcpdump/wireshark to see if the replies actually leave the server.
Best to run tcpdump from another system to be sure.
The protocol is TCP. Unfortunately we can't run tcpdump/wireshark because this is happening on the loopback interface on the limited test environment we're working in.
By "exceptions" we mean that when the server detects an error it sends the error back to the client ....
So are you saying you're running the 'server' and all the 'clients' on the same machine???
That's what you seem to be implying, if this is happening on the loopback interface..
By 'exceptions', I meant the 10% of 'clients' who don't get a reply.
Thanks for your replies and offers to help. Our developer discovered a couple of things in his code but he also discovered that fragmented packets are seemingly not handled as well on SUSE Linux as they were on FreeBSD and Solaris. He rewrote his program code to combine all replies in to single writes.
Thanks
Graham
Quote:
Originally Posted by chrism01
So are you saying you're running the 'server' and all the 'clients' on the same machine???
That's what you seem to be implying, if this is happening on the loopback interface..
By 'exceptions', I meant the 10% of 'clients' who don't get a reply.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.