473,231 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

Writing a CGI to query DB

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
4 1327
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: George Stout | last post by:
First off I do not know alot about writing queries to an Access Database from an ASP page. This is why I need help. I have an Events database for 6 colleges in our metro area. On the homepage I...
0
by: JC | last post by:
I am using Mysql version: 4.0.18-max-log and trying to populate a database from a text file using source option from inside the mysql environment. The population run OK but when creating the...
2
by: visionstate | last post by:
Hi there, Is there a way of searching a sub-form (reading from a query) without writing what is exactly contained in the query field. For example if I had a 'Finance Manager' in the query but just...
3
by: acdevteam | last post by:
Hello Everyone, We are a dev team very new to Access, and so far we have gotten excellent support from this group. We have a question about writing a query. Here is the situation: We have a...
16
by: laverdir | last post by:
<? $query = "SELECT " . $this->tabela3 . ".id, " . $this->tabela3 . ".naziv, " . $this->tabela3 . ".spisatelj, " . $this->tabela3 . ".najava, " . " DATE_FORMAT(" . $this->tabela3 ....
3
by: Thorben Grosser | last post by:
Hello Newsgroup, I am doing some archive database and therefore got one table indexing every folder and one table storing which rack belongs to which department, eg: table folders :...
28
by: Mark Braithwaite | last post by:
Hi We are attempting to create a dynamic spreadsheet which will extract information from CRM / SQL. We have very limited expierence in creating SQL queries and we would really appreciate any...
0
by: danielandalexa | last post by:
I'm wondering if it's possible to cleanly open multiple connections to an Excel file (through Microsoft.Jet.OLEDB.4.0), for writing query results. I'm running multiple queries, and they're set...
1
by: vapanchamukhi | last post by:
hi.... i want to write the query select * from user where name = "richard"; in perl the string richard i have taken that in the variable $name. i have written the query as below $sth =...
3
by: yappy77 | last post by:
I need an expression that will calculate the last day of a quarter based on a specific date. For example: Expiration date = 1/15/11; Last day of quarter = 3/31/11. I am not that great at...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.