You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dzilberte Bekode <ja...@yahoo.com> on 2008/12/19 13:22:25 UTC

too long

HI





I'm running Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 mod_ssl/2.2.3 OpenSSL/0.9.8c Server at 81.89.49.231 Port 80.





The problem is that when I submit any form (contact form or register
form) on my webpages, it takes too long to proceed (around 2 minutes)


It's pretty annoying.





Any Ideas what may be wrong?????





PS -  It has nothing to do with ssl because I had the same problem before I install and configure it.








Thank for replaying


      

Re: [users@httpd] Re: too long

Posted by André Warnier <aw...@ice-sa.com>.
Bruce Hyatt wrote:
> On Sat, Dec 20, 2008 at 6:09 AM, Dzilberte Bekode <ja...@yahoo.com> wrote:
>> Hi
>> thanks a lot man.
>> Now I know how it works.
That's the important thing.

>> But what I don't understant is why is it so slow only when I want submit
>> form, because page is running fast.
>> Anyway its working now after I've deleted everything in hosts file.
>> I realy don't understant. It can be empty?
> 
> My somewhat-educated guess is that you had an erroneous entry in your
> hosts file. I believe hosts can be empty if all the hosts you need to
> find are resolvable on your average domain-name server.
> 
The one line you should always keep in your local hosts file is
127.0.0.1 localhost

That is because "localhost" will never be resolved by any external DNS 
server, and you'll need it for things like :
ping localhost
(to verify your TCP/IP stack works e.g.)

or for getting a response from your local webserver (the one on your 
workstation), when you enter "http://localhost" in your browser.
(That is for the exact same reason as explained in an earlier message in 
this thread).



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: too long

Posted by Bruce Hyatt <br...@gmail.com>.
On Sat, Dec 20, 2008 at 6:09 AM, Dzilberte Bekode <ja...@yahoo.com> wrote:
> Hi
> thanks a lot man.
> Now I know how it works.
> But what I don't understant is why is it so slow only when I want submit
> form, because page is running fast.
> Anyway its working now after I've deleted everything in hosts file.
> I realy don't understant. It can be empty?

My somewhat-educated guess is that you had an erroneous entry in your
hosts file. I believe hosts can be empty if all the hosts you need to
find are resolvable on your average domain-name server.

Sincerely,
Bruce Hyatt

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: too long

Posted by Morgan Gangwere <0....@gmail.com>.
Dzilberte Bekode wrote:
> Hi
> thanks a lot man.
> Now I know how it works.
> But what I don't understant is why is it so slow only when I want submit 
> form, because page is running fast.
> Anyway its working now after I've deleted everything in hosts file.
> I realy don't understant. It can be empty?
> 
> Thanks
> 
> S pozdravom Janci Siser
> 
Yes it can be. hosts is simply an explicit 1-1 correlation between 
hostnames and logical addresses. If its not in the hosts file, it can be 
found somewhere.

For example, my hosts file looks like
127.0.0.1 doubleclick.com.
127.0.0.1 localhost
192.168.0.1 home
...
192.168.0.45 my-dns.internaldomain.

thats on a DNS server.

however I dont have a hosts file on my machine for work because i can 
garuntee that it hits my internal DNS server.

... Just a thought ...

-- 
Morgan Gangwere

Unknown Software
http://sonof.bandit.name/
Member, INCOSE [ incose.org ] PACA [ paca.org ] and NMUG [ nmug.net ]

FAIL: Cannot wind the coils on the Super High Power Extemely Large 
Hadron Collider! (fail code 0xd34df00d). please use the /extrafunds hook 
to avoid this next start.

Find me on FreeNode! irc.freenode.net ~indrora on ##linux

Re: too long

Posted by Dzilberte Bekode <ja...@yahoo.com>.
Hi
thanks a lot man.
Now I know how it works.
But what I don't understant is why is it so slow only when I want submit form, because page is running fast.
Anyway its working now after I've deleted everything in hosts file.
I realy don't understant. It can be empty?

Thanks 

S pozdravom Janci Siser

--- On Fri, 12/19/08, André Warnier <aw...@ice-sa.com> wrote:
From: André Warnier <aw...@ice-sa.com>
Subject: Re: too long
To: users@httpd.apache.org
Date: Friday, December 19, 2008, 11:34 AM

Dan Poirier wrote:
[...]

.. and he is right.
It really looks like a DNS problem, *on Dzilberte's workstation side*.
I connected to the site and submitted the contact form.  The response is
immediate (less than 1 second).

For Dzilberte :
I also do not know how much you know about how HTTP works, so I will assume you
do not know too much and describe it roughly.

When your browser is asked to "get" the URL
"http://www.brechot.sk/contact-form.php"
it really does this :

1) it tries to "translate" the hostname "www.brechot.sk"
into an IP address.  For that, the browser asks the local operating system
(Windows) to do the translation.
2) the local operating system first looks in the local "hosts" file,
to see if there is translation of "www.brechot.sk" into an IP address.
If there is one, the operating system returns the IP address to the browser,
and you can skip to 5).
3) if there is not translation in the local hosts file (probably), then the
operating system asks the DNS servers.
The DNS servers are the ones configured in your network connection setup.
Usually there is more than one.  If the first one does not answer, after a
minute or so the operating system tries the next one, etc..
That is probably what is happening in your case.
3a) If the DNS servers cannot in the end find an IP address for
"www.brechot.sk", then they tell the browser, and the browser tells
the user "this site cannot be found".
4) Assuming one of the DNS servers answers in the end, the operating system
returns the IP address to the browser.
5) Now the browser connects to that IP address, and sends the request
"GET(*) /contact-form.php"
(*) or POST

In my case, the mechanism above works fine, and my browser quickly send the
request to the server, and the server answers quickly.

Evidently in your case, somewhere between 3) and 4) above, something is not
working correctly.
In other words, it probably has nothing to do with your webserver, but is
probably a local problem of the DNS setup of your workstation.

Confirm this as follows :
- open a "command window"
- enter : nslookup www.brechot.sk
and see how long it takes.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




      

Re: too long

Posted by André Warnier <aw...@ice-sa.com>.
Dan Poirier wrote:
[...]

.. and he is right.
It really looks like a DNS problem, *on Dzilberte's workstation side*.
I connected to the site and submitted the contact form.  The response is 
immediate (less than 1 second).

For Dzilberte :
I also do not know how much you know about how HTTP works, so I will 
assume you do not know too much and describe it roughly.

When your browser is asked to "get" the URL 
"http://www.brechot.sk/contact-form.php"
it really does this :

1) it tries to "translate" the hostname "www.brechot.sk" into an IP 
address.  For that, the browser asks the local operating system 
(Windows) to do the translation.
2) the local operating system first looks in the local "hosts" file, to 
see if there is translation of "www.brechot.sk" into an IP address.
If there is one, the operating system returns the IP address to the 
browser, and you can skip to 5).
3) if there is not translation in the local hosts file (probably), then 
the operating system asks the DNS servers.
The DNS servers are the ones configured in your network connection setup.
Usually there is more than one.  If the first one does not answer, after 
a minute or so the operating system tries the next one, etc..
That is probably what is happening in your case.
3a) If the DNS servers cannot in the end find an IP address for 
"www.brechot.sk", then they tell the browser, and the browser tells the 
user "this site cannot be found".
4) Assuming one of the DNS servers answers in the end, the operating 
system returns the IP address to the browser.
5) Now the browser connects to that IP address, and sends the request
"GET(*) /contact-form.php"
(*) or POST

In my case, the mechanism above works fine, and my browser quickly send 
the request to the server, and the server answers quickly.

Evidently in your case, somewhere between 3) and 4) above, something is 
not working correctly.
In other words, it probably has nothing to do with your webserver, but 
is probably a local problem of the DNS setup of your workstation.

Confirm this as follows :
- open a "command window"
- enter : nslookup www.brechot.sk
and see how long it takes.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: too long

Posted by Dan Poirier <po...@pobox.com>.
Delays that are multiples of a minute always make me look for DNS
problems, since often a failed DNS lookup will timeout in one minute.

It could be the client is failing to look up the host.  If the client
has multiple DNS servers defined, it could be that the first couple are
not responding and it takes two timeouts until it tries the third and it
finally works.  

The server could also be trying DNS lookups before responding.  If so,
try to change the configuration to not do DNS lookups on the server, as
even if DNS is properly configured, it will slow things down.

If you're familiar with network tracing, you might sniff UDP traffic on
port 53 to see if there are DNS lookups timing out.

Dan Poirier
poirier@pobox.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: too long

Posted by Dzilberte Bekode <ja...@yahoo.com>.
Hi
Thanks for replying.
I'm running two aplications on my virtual server. On both is the same problem.
When I trigger submit on my contact forms or register forms i have this problem.
But login of users are working fine.
I'm using Open Source e-commerce aplication Prestashop.
So the code should be fine I supouse
I've checked liveHttpHeader.When I trigger submit button theres nothing for 2 minutes and then it shown this:

http://www.brechot.sk/contact-form.php

POST /contact-form.php HTTP/1.1
Host: www.brechot.sk
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: cs,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1250,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.brechot.sk/contact-form.php
Cookie: 08b0ca538ce936b7f81f5026a2f80135=iJ3p4V%2F%2FWzs%3D0jkHBlr%2FS8I%3DVEp69Ew3JDc%3DTaoR0pfaz3w%3DqzmUL5%2BQ7bY%3DTHsON0yTlz4%3DRCnDAuFYMVk%3DG5F%2Fwk9ZaKA%3DlJTB19U0z6s%3D%2BFewCTXtHQA%3DRxBUSwAYuUI%3DVY6IVLm2skM%3Dk06H1Rch%2Frw%3DWLLpNcC%2BGhM%3D5oySdmPAVjo%3D9wbHxqkC1jM%3D
Content-Type: application/x-www-form-urlencoded
Content-Length: 69
id_contact=1&from=jancis2%40yahoo.com&message=test&submitMessage=Send
HTTP/1.x 200 OK
Date: Fri, 19 Dec 2008 14:28:21 GMT
Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 mod_ssl/2.2.3 OpenSSL/0.9.8c
X-Powered-By: PHP/5.2.0-8+etch13
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8
----------------------------------------------------------
http://www.brechot.sk/themes/prestashop2/css/global.css

GET /themes/prestashop2/css/global.css HTTP/1.1
Host: www.brechot.sk
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Accept: text/css,*/*;q=0.1
Accept-Language: cs,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1250,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.brechot.sk/contact-form.php
Cookie: 08b0ca538ce936b7f81f5026a2f80135=iJ3p4V%2F%2FWzs%3D0jkHBlr%2FS8I%3DVEp69Ew3JDc%3DTaoR0pfaz3w%3DqzmUL5%2BQ7bY%3DTHsON0yTlz4%3DRCnDAuFYMVk%3DG5F%2Fwk9ZaKA%3DlJTB19U0z6s%3D%2BFewCTXtHQA%3DRxBUSwAYuUI%3DVY6IVLm2skM%3Dk06H1Rch%2Frw%3DWLLpNcC%2BGhM%3D5oySdmPAVjo%3D9wbHxqkC1jM%3D
If-Modified-Since: Fri, 19 Dec 2008 14:28:02 GMT
If-None-Match: W/"4a663-bfaa-45e77ec743300"

HTTP/1.x 200 OK
Date: Fri, 19 Dec 2008 14:30:22 GMT
Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 mod_ssl/2.2.3 OpenSSL/0.9.8c
Last-Modified: Fri, 19 Dec 2008 14:30:22 GMT
Etag: W/"4a663-bfaa-45e77ec743300"
Accept-Ranges: bytes
Content-Length: 49066
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Content-Type: text/css
----------------------------------------------------------
http://www.brechot.sk/img/logo.jpg

GET /img/logo.jpg HTTP/1.1
Host: www.brechot.sk
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: cs,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1250,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.brechot.sk/contact-form.php
Cookie: 08b0ca538ce936b7f81f5026a2f80135=iJ3p4V%2F%2FWzs%3D0jkHBlr%2FS8I%3DVEp69Ew3JDc%3DTaoR0pfaz3w%3DqzmUL5%2BQ7bY%3DTHsON0yTlz4%3DRCnDAuFYMVk%3DG5F%2Fwk9ZaKA%3DlJTB19U0z6s%3D%2BFewCTXtHQA%3DRxBUSwAYuUI%3DVY6IVLm2skM%3Dk06H1Rch%2Frw%3DWLLpNcC%2BGhM%3D5oySdmPAVjo%3D9wbHxqkC1jM%3D
If-Modified-Since: Tue, 16 Dec 2008 14:54:38 GMT
If-None-Match: "3ad21-24fd-45e2b23702780"

HTTP/1.x 304 Not Modified
Date: Fri, 19 Dec 2008 14:30:22 GMT
Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 mod_ssl/2.2.3 OpenSSL/0.9.8c
Connection: Keep-Alive
Keep-Alive: timeout=15, max=98
Etag: "3ad21-24fd-45e2b23702780"
----------------------------------------------------------
http://www.brechot.sk/img/p/10-39-medium.jpg

GET /img/p/10-39-medium.jpg HTTP/1.1
Host: www.brechot.sk
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: cs,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1250,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.brechot.sk/contact-form.php
Cookie: 08b0ca538ce936b7f81f5026a2f80135=iJ3p4V%2F%2FWzs%3D0jkHBlr%2FS8I%3DVEp69Ew3JDc%3DTaoR0pfaz3w%3DqzmUL5%2BQ7bY%3DTHsON0yTlz4%3DRCnDAuFYMVk%3DG5F%2Fwk9ZaKA%3DlJTB19U0z6s%3D%2BFewCTXtHQA%3DRxBUSwAYuUI%3DVY6IVLm2skM%3Dk06H1Rch%2Frw%3DWLLpNcC%2BGhM%3D5oySdmPAVjo%3D9wbHxqkC1jM%3D
If-Modified-Since: Thu, 18 Dec 2008 11:28:20 GMT
If-None-Match: "3b675-1012-45e507d559d00"

HTTP/1.x 304 Not Modified
Date: Fri, 19 Dec 2008 14:30:22 GMT
Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 mod_ssl/2.2.3 OpenSSL/0.9.8c
Connection: Keep-Alive
Keep-Alive: timeout=15, max=97
Etag: "3b675-1012-45e507d559d00"
----------------------------------------------------------
http://www.brechot.sk/img/p/-medium.jpg

GET /img/p/-medium.jpg HTTP/1.1
Host: www.brechot.sk
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: cs,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: windows-1250,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.brechot.sk/contact-form.php
Cookie: 08b0ca538ce936b7f81f5026a2f80135=iJ3p4V%2F%2FWzs%3D0jkHBlr%2FS8I%3DVEp69Ew3JDc%3DTaoR0pfaz3w%3DqzmUL5%2BQ7bY%3DTHsON0yTlz4%3DRCnDAuFYMVk%3DG5F%2Fwk9ZaKA%3DlJTB19U0z6s%3D%2BFewCTXtHQA%3DRxBUSwAYuUI%3DVY6IVLm2skM%3Dk06H1Rch%2Frw%3DWLLpNcC%2BGhM%3D5oySdmPAVjo%3D9wbHxqkC1jM%3D
If-Modified-Since: Thu, 18 Dec 2008 11:28:20 GMT
If-None-Match: "3ad4a-1012-45e507d559d00"

HTTP/1.x 304 Not Modified
Date: Fri, 19 Dec 2008 14:30:23 GMT
Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 mod_ssl/2.2.3 OpenSSL/0.9.8c
Connection: Keep-Alive
Keep-Alive: timeout=15, max=100
Etag: "3ad4a-1012-45e507d559d00"
----------------------------------------------------------


S pozdravom Janci Siser

--- On Fri, 12/19/08, André Warnier <aw...@ice-sa.com> wrote:
From: André Warnier <aw...@ice-sa.com>
Subject: Re: too long
To: users@httpd.apache.org
Date: Friday, December 19, 2008, 6:01 AM

Dzilberte Bekode wrote:
I'm running Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 mod_ssl/2.2.3
OpenSSL/0.9.8c Server at 81.89.49.231 Port 80.
[...]
> Any Ideas what may be wrong?????

No, because there may be many reasons, and you do not really give enough
information to orient us.

But maybe you could try to find out yourself *where* it is taking so long.

Suggestion :
- install FireFox if not already there
- install in Firefox the add-on/plugin named "LiveHttpHeaders"
This will add in the "Tools" menu of Firefox an item called
"Live Http Headers". Click on it, and it opens a new window.  Leave
this window open, and go back to the main window.
Submit your form.
Then go back to the Live-Http.. window, and you see the exchange between  your
browser and your server.  This may already show you something.

Next, look in your Apache log files, at the time of your form submit.
Anything strange there ?

Nest, post the <form ..> tag of the form that you are submitting.
Maybe that will tell us something.

You could also tell us what the application that is processing that form is
supposed to be doing with the data.  Maybe it just takes long to do ?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




      

Re: too long

Posted by André Warnier <aw...@ice-sa.com>.
Dzilberte Bekode wrote:
I'm running Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 mod_ssl/2.2.3 
OpenSSL/0.9.8c Server at 81.89.49.231 Port 80.
[...]
 > Any Ideas what may be wrong?????

No, because there may be many reasons, and you do not really give enough 
information to orient us.

But maybe you could try to find out yourself *where* it is taking so long.

Suggestion :
- install FireFox if not already there
- install in Firefox the add-on/plugin named "LiveHttpHeaders"
This will add in the "Tools" menu of Firefox an item called "Live Http 
Headers". Click on it, and it opens a new window.  Leave this window 
open, and go back to the main window.
Submit your form.
Then go back to the Live-Http.. window, and you see the exchange between 
  your browser and your server.  This may already show you something.

Next, look in your Apache log files, at the time of your form submit.
Anything strange there ?

Nest, post the <form ..> tag of the form that you are submitting.
Maybe that will tell us something.

You could also tell us what the application that is processing that form 
is supposed to be doing with the data.  Maybe it just takes long to do ?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org