Writing a CGI to query DB

B

Bighead

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.
 
T

TheFlyingDutchman

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?
 
P

paulC

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
 
B

Bighead

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.
 
B

Bighead

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top