LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 05-20-2009, 02:31 PM   #1
9lives
LQ Newbie
 
Registered: Oct 2006
Posts: 6

Rep: Reputation: 0
Question 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,

Thanks
Graham
 
Old 05-21-2009, 02:16 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 18,233

Rep: Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708
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.
 
Old 05-21-2009, 03:12 AM   #3
9lives
LQ Newbie
 
Registered: Oct 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Hi Chris

Thanks for your reply.

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 ....

Thanks
Graham
 
Old 05-21-2009, 06:04 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 18,233

Rep: Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708
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.
 
Old 05-24-2009, 03:51 PM   #5
9lives
LQ Newbie
 
Registered: Oct 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Hi Chris,

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 View Post
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.
 
  


Reply

Tags
lost, suse


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Server and Client process using Openssl: Error: no client certificate available lokesh_c2004 Linux - Security 2 11-10-2008 08:30 AM
run a shell script on remote client from a server to find all its running process robin singh Linux - Newbie 7 10-03-2008 11:32 AM
Server high load, testing hardware reliability and limiting process stelar Linux - Enterprise 1 10-20-2006 12:58 AM
simple backup process using server/client technology debloxie Linux - Networking 11 10-24-2005 02:58 PM
iptables POSTROUTING doesn't match local-process replies. bentz Linux - Networking 3 03-10-2004 06:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration