You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Oscar Celada <oc...@renta4.es> on 2010/10/07 16:49:06 UTC

[users@httpd] The apache duplicate the request

The apache duplicate the request:

I have installed apache httpd 2.2.10 with mod jk 1.2.28 and tomcat 6.0.29. I
have a transaction that is  executed in the tomcat and that lasts for 15
minutes. The problem is in that Apache once 300 second bests were  passed
throws the same request again. I have played the parameter Timeout of the
httpd.conf but I do not resolve the problem.

How can I avoid this problem? The initial petition I would not care to cut
across timeout but what I do not want is duplicate the request right now
than each he gives 300 seconds, this does that the tomcat die .

Thanks and a greeting, Óscar.


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


RE: [users@httpd] The apache duplicate the request

Posted by Oscar Celada <oc...@renta4.es>.
Hello:

I've changed the value of recovery_options (JK's parameter) to 3 and for the
moment the problem doesn't occur.

Thank you so much, Rainer. 

-----Mensaje original-----
De: Rainer Jung [mailto:rainer.jung@kippdata.de] 
Enviado el: viernes, 08 de octubre de 2010 15:38
Para: users@httpd.apache.org
Asunto: Re: [users@httpd] The apache duplicate the request

On 08.10.2010 13:44, Oscar Celada wrote:
> Hello Rainer:
>
>   Yesterday I changed the connector jk for mod_wl_22.so and the 
> problem goes on. If I do the request against tomcat directly it works 
> well. For this test I suppose that the problem is in the apache server 
> or in the browser (like you say).

OK

>   I use a cluster with 6 tomcats, I can't put this parameter in the jk 
> because I need that the JK repeat a request when one tomcat(of 
> cluster)is died.

You can try to adjust the attribute accordingly (allow retries for GET
requests, allow retries when there was a problem sending the request, but
not once the request was received by the backend, ...). What it tries to
prevent is starting a business transaction twice.

Regards,

Rainer



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


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


Re: [users@httpd] The apache duplicate the request

Posted by Rainer Jung <ra...@kippdata.de>.
On 08.10.2010 13:44, Oscar Celada wrote:
> Hello Rainer:
>
>   Yesterday I changed the connector jk for mod_wl_22.so and the problem goes
> on. If I do the request against tomcat directly it works well. For this test
> I suppose that the problem is in the apache server or in the browser (like
> you say).

OK

>   I use a cluster with 6 tomcats, I can't put this parameter in the jk
> because I need that the JK repeat a request when one tomcat(of cluster)is
> died.

You can try to adjust the attribute accordingly (allow retries for GET 
requests, allow retries when there was a problem sending the request, 
but not once the request was received by the backend, ...). What it 
tries to prevent is starting a business transaction twice.

Regards,

Rainer



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


RE: [users@httpd] The apache duplicate the request

Posted by Oscar Celada <oc...@renta4.es>.
Hello Rainer:

 Yesterday I changed the connector jk for mod_wl_22.so and the problem goes
on. If I do the request against tomcat directly it works well. For this test
I suppose that the problem is in the apache server or in the browser (like
you say).

 I use a cluster with 6 tomcats, I can't put this parameter in the jk
because I need that the JK repeat a request when one tomcat(of cluster)is
died.

Thanks in advanced. 

-----Mensaje original-----
De: Rainer Jung [mailto:rainer.jung@kippdata.de] 
Enviado el: viernes, 08 de octubre de 2010 13:17
Para: users@httpd.apache.org
Asunto: Re: [users@httpd] The apache duplicate the request

On 07.10.2010 16:49, Oscar Celada wrote:
>
> The apache duplicate the request:
>
> I have installed apache httpd 2.2.10 with mod jk 1.2.28 and tomcat 
> 6.0.29. I have a transaction that is  executed in the tomcat and that 
> lasts for 15 minutes. The problem is in that Apache once 300 second 
> bests were  passed throws the same request again. I have played the 
> parameter Timeout of the httpd.conf but I do not resolve the problem.
>
> How can I avoid this problem? The initial petition I would not care to 
> cut across timeout but what I do not want is duplicate the request 
> right now than each he gives 300 seconds, this does that the tomcat die .

I expect that the duplicatiuon is either done by mod_jk or by the browser
(JavaScript?).

For mod_jk you would want to set the recovery options such that no
duplication is done. Look for "recovery_options" in

http://tomcat.apache.org/connectors-doc/reference/workers.html

You might want to set the attribute to the value "7". You mod_jk log file
should tell you, whether mod_jk retried the request.

In case there's more questions: the right list to discuss mod_jk is the
Tomcat users mailing list.

To subscribe, send mail to

    users-subscribe@tomcat.apache.org

To jumpstart the discussion there, please provide in the post your mod_jk
version number, your configuration and possibly the contents of the mod_jk
log file.

Regards,

Rainer

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


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


Re: [users@httpd] The apache duplicate the request

Posted by Rainer Jung <ra...@kippdata.de>.
On 07.10.2010 16:49, Oscar Celada wrote:
>
> The apache duplicate the request:
>
> I have installed apache httpd 2.2.10 with mod jk 1.2.28 and tomcat 6.0.29. I
> have a transaction that is  executed in the tomcat and that lasts for 15
> minutes. The problem is in that Apache once 300 second bests were  passed
> throws the same request again. I have played the parameter Timeout of the
> httpd.conf but I do not resolve the problem.
>
> How can I avoid this problem? The initial petition I would not care to cut
> across timeout but what I do not want is duplicate the request right now
> than each he gives 300 seconds, this does that the tomcat die .

I expect that the duplicatiuon is either done by mod_jk or by the 
browser (JavaScript?).

For mod_jk you would want to set the recovery options such that no 
duplication is done. Look for "recovery_options" in

http://tomcat.apache.org/connectors-doc/reference/workers.html

You might want to set the attribute to the value "7". You mod_jk log 
file should tell you, whether mod_jk retried the request.

In case there's more questions: the right list to discuss mod_jk is the 
Tomcat users mailing list.

To subscribe, send mail to

    users-subscribe@tomcat.apache.org

To jumpstart the discussion there, please provide in the post your 
mod_jk version number, your configuration and possibly the contents of 
the mod_jk log file.

Regards,

Rainer

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


Re: [users@httpd] The apache duplicate the request

Posted by Mark Watts <m....@eris.qinetiq.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/07/2010 03:49 PM, Oscar Celada wrote:
> 
> The apache duplicate the request:
> 
> I have installed apache httpd 2.2.10 with mod jk 1.2.28 and tomcat 6.0.29. I
> have a transaction that is  executed in the tomcat and that lasts for 15
> minutes. The problem is in that Apache once 300 second bests were  passed
> throws the same request again. I have played the parameter Timeout of the
> httpd.conf but I do not resolve the problem.
> 
> How can I avoid this problem? The initial petition I would not care to cut
> across timeout but what I do not want is duplicate the request right now
> than each he gives 300 seconds, this does that the tomcat die .

sounds like a pretty unpleasant web-app.

Anyway, try increasing ProxyTimeout to something large:

http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxytimeout

- -- 
Mark Watts BSc RHCE MBCS
Senior Systems Engineer, IPR Secure Managed Hosting
www.QinetiQ.com
QinetiQ - Delivering customer-focused solutions
GPG Key: http://www.linux-corner.info/mwatts.gpg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkyt3rcACgkQBn4EFUVUIO1N7wCgxfnsKI17pPAQt4vO1qUgKhlo
EjgAnjIKM4Obpqp/Aq4jpNk6vknc55/m
=olcO
-----END PGP SIGNATURE-----

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