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

Tags used in this thread
Popular LQ Tags , , , ,

Reply
 
Thread Tools
Old 05-20-2009, 03:31 PM   #1
9lives
LQ Newbie
 
Registered: Oct 2006
Posts: 6
Thanked: 0
Question Client Server process always drops circa 10% of replies irrespective of load


[Log in to get rid of this advertisement]
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
9lives is offline  
Tag This Post , , , ,
Reply With Quote
Old 05-21-2009, 03:16 AM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 5.4
Posts: 7,411
Thanked: 324
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.
chrism01 is offline     Reply With Quote
Old 05-21-2009, 04:12 AM   #3
9lives
LQ Newbie
 
Registered: Oct 2006
Posts: 6
Thanked: 0

Original Poster
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
9lives is offline     Reply With Quote
Old 05-21-2009, 07:04 AM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 5.4
Posts: 7,411
Thanked: 324
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.
chrism01 is offline     Reply With Quote
Old 05-24-2009, 04:51 PM   #5
9lives
LQ Newbie
 
Registered: Oct 2006
Posts: 6
Thanked: 0

Original Poster
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.
9lives is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 09: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 12:32 PM
Server high load, testing hardware reliability and limiting process stelar Linux - Enterprise 1 10-20-2006 01:58 AM
simple backup process using server/client technology debloxie Linux - Networking 11 10-24-2005 03:58 PM
iptables POSTROUTING doesn't match local-process replies. bentz Linux - Networking 3 03-10-2004 07:34 PM


All times are GMT -5. The time now is 01:54 PM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration