Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Awkward delay/hang while using proxy |
|
Author |
|
sujan54004
Joined: 10 Apr 2013 Posts: 2 Location: Finland
|
Posted: Thu 11 Apr '13 12:38 Post subject: Awkward delay/hang while using proxy |
|
|
Hello Everyone,
I am using apache proxypass to proxy to 4 different ports (java/jsp applications) with the following configurations (for each):
<VirtualHost *:80>
ProxyPreserveHost On
ProxyRequests Off
ServerName *****.org
ProxyPass / http://*****.org:8080/ retry=0
ProxyPassReverse / http://*****.org:8080/
</VirtualHost>
Everything seems work fine until an awkward delay / connection timeout occurs. The web application hangs for about 5 to 15 seconds and starts working normally after that period. It's certainly not the application's issue because everything is fine when using IP address to access it.
When I enabled the debug log in apache, I found out that every time the server seems to hang, the following error appears in the apache error log and the number of apache child processes keep on increasing (ps aux | grep apache).
[Thu Apr 11 10:20:41 2013] [debug] proxy_util.c(1818): proxy: grabbed scoreboard slot 4 in child 13208 for worker proxy:reverse
[Thu Apr 11 10:20:41 2013] [debug] proxy_util.c(1837): proxy: worker proxy:reverse already initialized
[Thu Apr 11 10:20:41 2013] [debug] proxy_util.c(1934): proxy: initialized single connection worker 4 in child 13208 for (*)
[Thu Apr 11 10:20:41 2013] [debug] proxy_util.c(1818): proxy: grabbed scoreboard slot 3 in child 13208 for worker http://*****.org:8080/
.....
Also, the access log (access.log) completely stops during that hang period.
This debug message keeps on repeating as long as Apache/web-application is not responding. The application starts to work normally after that duration and the number of apache child process decrease to the normal number.
I have already been looking into this issue since a week now but I haven't been able to find any reason or solution for it. I would really appreciate for any help.
Apache version : 2.2.16 (Debian)
OS : Debian GNU/Linux 6.0
root@server:~# apache2 -V
Server version: Apache/2.2.16 (Debian)
Server built: Nov 30 2012 08:58:36
Server's Module Magic Number: 20051115:24
Server loaded: APR 1.4.2, APR-Util 1.3.9
Compiled using: APR 1.4.2, APR-Util 1.3.9
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/etc/apache2"
-D SUEXEC_BIN="/usr/lib/apache2/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="mime.types"
-D SERVER_CONFIG_FILE="apache2.conf"
Thanks,
Sujan |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 15 Apr '13 5:28 Post subject: |
|
|
Your mpm config? |
|
Back to top |
|
sujan54004
Joined: 10 Apr 2013 Posts: 2 Location: Finland
|
Posted: Mon 15 Apr '13 8:54 Post subject: mpm configuration |
|
|
Hello James,
Thanks for replying. Here's my mpm configuration:
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 250
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_worker_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 100
MaxClients 250
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_event_module>
StartServers 2
MaxClients 250
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 200
MaxRequestsPerChild 0
</IfModule> |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 23 Apr '13 11:17 Post subject: |
|
|
Hm that seems to be ok. How did you configure your reverse proxy? |
|
Back to top |
|
gpradeep4
Joined: 11 May 2016 Posts: 1 Location: singapore
|
Posted: Wed 11 May '16 17:25 Post subject: |
|
|
Hi is this issue solved |
|
Back to top |
|
|
|
|
|
|