Kevin Dangoor wrote:
> I've been trying to proxy from lighthttpd to the standard CherryPy
> server (no SCGI/FastCGI involved) and have been seeing a strange
> problem. When I first start it up and CP tries to listen on the
> socket, netstat shows the socket in a SYN_SENT state. After some
> timeout period, it finally comes up and starts listening. It works,
> but it's annoying to have a wait a minute whenever you restart the
> server.
>
> Has anyone else seen this? Is there an easy solution?
My guess is that you're seeing cherrypy._cpserver.Server check that its
own port is ready to receive requests (which it does via
socket.connect(); socket.close()). See wait_for_free_port and
wait_for_occupied_port in that module. If you're experiencing timeouts
of more than a second, then 1) there's something wrong with the HTTP
server, and 2) CP therefore won't let you receive requests, by design.
Robert Brewer
System Architect
Amor Ministries
fuma...@amor.org