Writing a CGI to query DB

Bighead Xue.Huichao at gmail.com
Sat Nov 10 22:29:04 EST 2007


On Nov 11, 6:20 am, paulC <pcli... at gmail.com> wrote:
> On 10 Nov, 04:33, Bighead <Xue.Huic... at gmail.com> wrote:
>
> > Hi,
>
> > I am currently working on a CGI deployed on an Apache server, which,
> > given an arbitrary SQL, fetches raw data from a remote DB server and
> > return them in a HTML page. This CGI works fine on quick SQLs.
>
> > But when I try to run a slow SQL on this CGI, through a Squid Proxy, I
> > always get the Error message from Squid: Zero Sized Reply, after 5
> > minutes.
>
> > The SQL itself is correct, since I have tried it directly on the DB
> > server. So what do you think might cause the problem? Thank you.
>
> This sounds a lot like an apache server configuration problem. From
> the squid FAQ;
>
> 11.51 Why do I sometimes get ``Zero Sized Reply''?
>
> This happens when Squid makes a TCP connection to an origin server,
> but for some reason, the connection is closed before Squid reads any
> data. Depending on various factors, Squid may be able to retry the
> request again. If you see the ``Zero Sized Reply'' error message, it
> means that Squid was unable to retry, or that all retry attempts also
> failed.
>
> The apache server has a default TimeOut of 300 seconds.
>
> This question might be more usefully answered by the apache user
> group.
>
> Regards, Paul Clinch


Thank you.
TimeOut of 300 seconds, does it mean that the connection will be
closed by remote Apache server if the server does not provide any data
in 300 seconds? So I can just let the server generate data
continuously, and the connection will not be cut off, right?




More information about the Python-list mailing list