By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,768 Members | 2,054 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,768 IT Pros & Developers. It's quick & easy.

Writing a CGI to query DB

P: n/a
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.

Nov 10 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Nov 9, 8:33 pm, Bighead <Xue.Huic...@gmail.comwrote:
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.
Slow SQL = query that takes a long time? How long does the query take
if you run it on the same machine as the DB server without a Squid
Proxy?

Nov 10 '07 #2

P: n/a
On 10 Nov, 04:33, Bighead <Xue.Huic...@gmail.comwrote:
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

Nov 10 '07 #3

P: n/a
On Nov 10, 7:18 pm, TheFlyingDutchman <zzbba...@aol.comwrote:
On Nov 9, 8:33 pm, Bighead <Xue.Huic...@gmail.comwrote:
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.

Slow SQL = query that takes a long time? How long does the query take
if you run it on the same machine as the DB server without a Squid
Proxy?

It takes 10 minutes to run this SQL. Squid's error message pops up in
about 5 minutes.

Nov 11 '07 #4

P: n/a
On Nov 11, 6:20 am, paulC <pcli...@gmail.comwrote:
On 10 Nov, 04:33, Bighead <Xue.Huic...@gmail.comwrote:
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?

Nov 11 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.