[Zope] Zope + Apache on FreeBSD 4.0 problems

Peter Haight peterh@sapros.com
Sun, 16 Jul 2000 20:12:10 -0700


>I'm having trouble getting pcgi working for Zope 2.16 on Apache 1.3.12
>on FreeBSD 4.0. I had hope the BSd ports would set it up but it seems
>that there is a problem of some sort with my install.
>
>Zope.cgi produces output but kind of maimed.
>
>I did get Zope.cgi working with IIS and NT (ugh) at work.
>
>Any tricks or anything would be appreciated.

I did run into a problem myself it might be the same as yours. I kept getting: 

Temporarily Unavailable 

       The resource you requested is temporarily unavailable - please try
       again later. 

       (116) unable to connect, fd=4 

The pcgi log would say:
Sun Jul 16 20:04:25 2000
  pcgi-wrapper: Error receiving stdout  (116) unable to connect, fd=4

After much debugging I found that if you looked at the
PCGIPublisher::handler method in pcgi/pcgi_publisher.py, it would do a
conn.send(stdout) and if you looked at the return value you would find that
it only would send 8192 bytes no matter how long the stdout string was.

This is due to some sysctl settings: net.local.stream.recvspace and
net.local.stream.sendspace. They are set to 8192.

I adjusted mine to 65536 using the following two commands:
sysctl -w net.local.stream.recvspace=65536
sysctl -w net.local.stream.sendspace=65536

Now it seems to be working well.

I'm not sure whose bug this is. I think it is probably a problem with
FreeBSD. I'll upgrade to 4.0-STABLE soon and see if is still a problem.

If this is not the problem you are having, you really need to elaborate more
on what you mean by 'maimed' output.