Warning: accept() error: Socket operation on non-socket

Warning: accept() error: Socket operation on non-socket

Post by James Zepe » Sun, 19 Oct 1997 04:00:00



: Zeus says the following about the problem:

: "The only way the
: accept() should fail, is either there is a "OS resource problem" which
: prevents the allocation of another socket buffer for the new
: connection, or if the client's TCP stack closes its connection before
: completing the 3-way handshake necessary to establish a TCP
: connection.  A third possibility is that someone is flooding your
: TCP/IP stack with SYN packets which is causing the listen queue to
: fill and the OS to drop all connections being established."

That's 100% correct.  What's the uptime on your computer?  If you haven't
restarted it in a while, do that.  Also try cvsupin the latest sources for
FreeBSD 2.2.x, and make a new kernel (keep a backup).  Is telnetd working?
(i.e. can you telnet into your machine? you shouldn't really be running
a telnet daemon on a web server tho).  On FreeBSD I would really recommend
using Apache 1.2.4 as a web server, I've never heard of Zeus, but I'd be
willing to guess Apache could provide you with on par if not faster
performance. Plus it's free.  www.apache.org

: They are looking for a way to keep the server from logging it, but have
: not gotten back to me.

If it logs to its own file, stop the server, remove the log, and symlink
that file to /dev/null.  If it uses syslog, edit syslog.conf and restart
syslog.conf.

: MY QUESTION:  What are the things I should look for on my server to figure
: out what is causing this problem in the first place?  I don't think it's a
: client problem, because it is now TOO frequent and steady.  If it is a "OS
: resource problem" then how do I figure it out?  If it is someone "flooding
: your TCP/IP stack with SYN packets" then how can I check to see who's
: doing it?

Check the router logs.  If they show nothing abnormal, then start checking
out your computer.

- j. a. zepeda

 
 
 

Warning: accept() error: Socket operation on non-socket

Post by Marc Slemk » Mon, 20 Oct 1997 04:00:00



Quote:>a telnet daemon on a web server tho).  On FreeBSD I would really recommend
>using Apache 1.2.4 as a web server, I've never heard of Zeus, but I'd be
>willing to guess Apache could provide you with on par if not faster
>performance. Plus it's free.  www.apache.org

Under conditions of fairly constrained memory availability, Zeus will
perform far faster than Apache.  It will also eat less CPU, up to
a certain point.

If you are limited more by network bottlenecks, Apache is as good
or better performance wise.

Zeus does, however, have possible limitations in possibly not
scaling with your hardware and in the features it provides and
limited extensibility due to its design.

It is unwise to dismiss a web server just because you may have not
heard of it.  Some of the things Zeus does are quite impressive.
I don't recommend it for typical sites though, even those that
require high performance.

 
 
 

Warning: accept() error: Socket operation on non-socket

Post by Larry Doolitt » Mon, 20 Oct 1997 04:00:00



: >a telnet daemon on a web server tho).  On FreeBSD I would really recommend
: >using Apache 1.2.4 as a web server, I've never heard of Zeus, but I'd be
: >willing to guess Apache could provide you with on par if not faster
: >performance. Plus it's free.  www.apache.org

: Under conditions of fairly constrained memory availability, Zeus will
: perform far faster than Apache.  It will also eat less CPU, up to
: a certain point.

As will Boa, which is also free.  www.boa.org

: If you are limited more by network bottlenecks, Apache is as good
: or better performance wise.

Sure.  Let me rephrase this: if Apache is slower than Zeus (or Boa),
you can match the speed by buying a bigger/faster computer.

: Zeus does, however, have possible limitations in possibly not
: scaling with your hardware and in the features it provides and
: limited extensibility due to its design.

Huh?  I guess it would be hard to add mod_perl to Zeus (and Boa).
Personally, I think sold _c_ code put into a nph-cgi program would
do most things better than Apache + mod_perl.  But then, most people
would rather hack up a perl script than carefully design a high
performance c proggie. :-(

: It is unwise to dismiss a web server just because you may have not
: heard of it.  Some of the things Zeus does are quite impressive.
: I don't recommend it for typical sites though, even those that
: require high performance.

Many people complain about the price tag, too.

Newsgroups trimmed.


                       (disclaimer: I am a Boa maintainer, my
                        judgements on webservers may be skewed)

 
 
 

Warning: accept() error: Socket operation on non-socket

Post by Larry Doolitt » Mon, 20 Oct 1997 04:00:00




: >: If you are limited more by network bottlenecks, Apache is as good
: >: or better performance wise.

: >Sure.  Let me rephrase this: if Apache is slower than Zeus (or Boa),
: >you can match the speed by buying a bigger/faster computer.

: I can't comment on Boa, however when doing some benchmarking on
: various setups I did note a tendency of Zeus to sometimes have
: lower performace in terms of the rate of sending data to the client
: than Apache when both were given the same amount of resources and
: the amount of resources were adequate for Apache's heavier footprint.
                                                     ^^^^^^^^^^^^^^^^^
This was my point, however poorly I stated it.  If you try to
run Apache on a machine which is not sized right, performance will
suffer.  "Sized right" for Apache is bigger (for a given load and
network connection) than "Sized right" for Boa and Zeus.  When
the machine is "big enough" in all cases, you can saturate the
wire. (time to get a bigger wire :-)

The backup to my assertion is mostly anecdotal, despite what the
web-benchmarkers say their art is rather primitive at the moment.
Also, all three servers are moving targets, e.g.,  Boa-0.93 uses
1/3 the user-space CPU cycles per request compared with Boa-0.92.


: >                       (disclaimer: I am a Boa maintainer, my
: >                        judgements on webservers may be skewed)

: disclaimer: I am some sort of Apache yadda yadda, and my
: judgements on webservers are skewed towards things written in C
: whose name is that of a ruffian of a type infesting Paris.

  - Larry Doolittle   yadda yadda yourself :-)

 
 
 

Warning: accept() error: Socket operation on non-socket

Post by Marc Slemk » Mon, 20 Oct 1997 04:00:00




>: If you are limited more by network bottlenecks, Apache is as good
>: or better performance wise.
>Sure.  Let me rephrase this: if Apache is slower than Zeus (or Boa),
>you can match the speed by buying a bigger/faster computer.

No.  

I can't comment on Boa, however when doing some benchmarking on
various setups I did note a tendency of Zeus to sometimes have
lower performace in terms of the rate of sending data to the client
than Apache when both were given the same amount of resources and
the amount of resources were adequate for Apache's heavier footprint.
There is more to it than what you suggest.

This was, however, a little bit ago against what is probably not the
latest version of Zeus any more and what is definitely not the latest
Apache any more.

Quote:>: Zeus does, however, have possible limitations in possibly not
>: scaling with your hardware and in the features it provides and
>: limited extensibility due to its design.
>Huh?  I guess it would be hard to add mod_perl to Zeus (and Boa).

Due to its single process, unthreaded nature there is a whole lot
of scheduling that Zeus has to deal with that is normally dealt
with by the OS.  There is overhead in doing this in userland (even
though there is also a very large decreased overhead in terms of
context switches).  When given whacks of resources (ie. more than
Zeus needs), at times it appeared to be running into limits because
of its single process design that Apache did not run into.  Yes,
Apache needed more hardware but Zeus, even when given more hardware,
could not exploit it.

It is difficult to say exactly what was going on; it could be Zeus
code, it could be OS issues, it could be a combination of them.

Quote:>Personally, I think sold _c_ code put into a nph-cgi program would
>do most things better than Apache + mod_perl.  But then, most people
>would rather hack up a perl script than carefully design a high
>performance c proggie. :-(

mod_perl is a lot more powerful because it gives you access to
a very large part of the server functionality.  You could do
exactly the same in a seperate C program, however you would have
to recode a _lot_ of it.  It isn't just mod_perl though; you can't
ignore the advantages of having an integral API.  That is harder
to code with a multithreaded server than a process based
server, and even harder in an unthreaded single process server.

None of this is good or bad in itself, it simply means that different
servers work best for different situations.  No suprise, that is the
way software always has been and probably always will be.

[...]


>                       (disclaimer: I am a Boa maintainer, my
>                        judgements on webservers may be skewed)

disclaimer: I am some sort of Apache yadda yadda, and my
judgements on webservers are skewed towards things written in C
whose name is that of a ruffian of a type infesting Paris.
 
 
 

Warning: accept() error: Socket operation on non-socket

Post by Marc Slemk » Tue, 21 Oct 1997 04:00:00



Quote:>This was my point, however poorly I stated it.  If you try to
>run Apache on a machine which is not sized right, performance will
>suffer.  "Sized right" for Apache is bigger (for a given load and
>network connection) than "Sized right" for Boa and Zeus.  When
>the machine is "big enough" in all cases, you can saturate the
>wire. (time to get a bigger wire :-)

You don't understand what I am saying.  What I am saying is that
Apache is giving _BETTER_ throughput over the same network connection
than Zeus did if the machine was powerful enough.  That is not simply
a case of Apache needing a bigger machine for the same performance.
 
 
 

Warning: accept() error: Socket operation on non-socket

Post by Larry Doolitt » Tue, 21 Oct 1997 04:00:00



: > [chop]  "Sized right" for Apache is bigger (for a given load and
: >network connection) than "Sized right" for Boa and Zeus.  When
: >the machine is "big enough" in all cases, you can saturate the
: >wire. (time to get a bigger wire :-)

: You don't understand what I am saying.  What I am saying is that
: Apache is giving _BETTER_ throughput over the same network connection
: than Zeus did if the machine was powerful enough.  That is not simply
: a case of Apache needing a bigger machine for the same performance.

Sounds like that version of Zeus and/or the OS was either
(1) buggy, (2) misconfigured, or (3) mismatched to each other.

There are tradeoffs, too.  Do you want the header info to
go out first, in its own packet, or do you want it merged
with the first few hundred bytes of data?  The former will
probably reduce latency slightly, the latter will give higher
throughput numbers at high load.  Boa has historically taken
the former approach, I hope to make it configurable.