Hi Everyone,
BACKGROUND: I'm attempting to move a web site from an older host running
Win2K server and Apache 2.2.8 (installed using
apache_2.2.8-win32-x86-openssl-0.9.8e.msi) to one running Ubuntu 11.10
64-bit server and Apache 2.2.20 (installed from the Ubuntu repositories
- version 2.2.20-1ubuntu1.2). The old host and site have been running
problem-free for years but the hardware is no longer supported. Both
hosts are remote and I'm SSH'ing in.
The site uses python and mod_python (python 2.6 and
mod_python-3.3.2-dev-20080819.win32-py2.6.exe on Win2K; python 2.7.2 and
mod_python 3.3.1 packages on Ubuntu). Aside from versions the setup on
the new host is intended to be the same as on the old one - both use
mpm-worker, the virtual host setup is the same, and the python source
code is being used as-is.
There is a difference in modules being loaded but this is a result of
leaving the defaults rather than conscious choice - only mod_python was
added:
old host: actions alias asis auth_basic authn_default authn_file
authz_default authz_groupfile authz_host authz_user autoindex cgi dir
env include isapi log_config mime negotiation rewrite setenvif
new host: alias auth_basic authn_file authz_default authz_groupfile
authz_host authz_user autoindex cgid deflate dir env mime negotiation
reqtimeout rewrite setenvif status
PROBLEM: For the most part the site runs without problem on the new host
- once logged in. There is an intermittent problem with logging in
which, once it starts, usually persists until the server is restarted.
Login uses an Ajax POST to send name and password data to the server.
After this POST the login module returns a response indicating success
or failure. Intermittently the server fails to respond and the user is
left at the login page. This never happens with the old host. Ajax POSTs
are used throughout the site and in other cases work flawlessly.
TROUBLESHOOTING: Nothing related is written to error.log. I've used
Firebug and Live HTTP Headers at the client and dumped packets with
Wireshark and tcpdump on both the client and the server on both the old
host and the new host. It's clear that the POST is always being sent by
the client and received at the server and that it's not a client cache
problem (POSTs shouldn't be cached anyway but in addition every response
from the server sends a Cache-Control: no-cache, no-store, max-age=0,
must-revalidate header as this is a web database application).
The Win2K/Apache2.2.8 host always answers the POST with two packets. The
client acknowledges the first one after which the server sends the
second packet. Wireshark at the client shows (c=client, s=server):
4 0.048009 c s HTTP POST <removed>?<removed>
HTTP/1.1 (application/x-www-form-urlencoded)
5 0.146959 s c TCP [TCP segment of a
reassembled PDU]
6 0.147003 c s TCP 42170 > http [ACK] Seq=646
Ack=711 Win=7296 Len=0 TSV=92849239 TSER=262641577
7 0.148331 s c HTTP HTTP/1.1 200 OK (text/plain)
The Ubuntu/Apache2.2.20 host always answers the POST with three packets
when it succeeds. tcpdump at the server shows:
12:50:28.025426 IP c > s: Flags [P.], seq 1:666, ack 1, win 46, options
[nop,nop,TS val 93919015 ecr 126730058], length 665
12:50:28.025502 IP s > c: Flags [.], ack 666, win 124, options
[nop,nop,TS val 126730075 ecr 93919015], length 0
12:50:29.043439 IP s > c: Flags [P.], seq 1:641, ack 666, win 124,
options [nop,nop,TS val 126730330 ecr 93919015], length 640
12:50:29.043785 IP s > c: Flags [P.], seq 641:646, ack 666, win 124,
options [nop,nop,TS val 126730330 ecr 93919015], length 5
The POST gets written to access.log and the user is logged in or not. It
only sends the first of the usual three packets when it fails:
12:44:10.456732 IP c > s: Flags [P.], seq 1:666, ack 1, win 46, options
[nop,nop,TS val 93881259 ecr 126635666], length 665
12:44:10.456813 IP s > c: Flags [.], ack 666, win 124, options
[nop,nop,TS val 126635683 ecr 93881259], length 0
I've verified this many (many) times. The POST does not get written to
access.log and the user is left waiting. Apache itself doesn't hang and
if the browser is refreshed and login tried again then it sometimes
succeeds.
I've tried disabling all the modules that seem significant namely
deflate, negotiation, and reqtimeout but this doesn't help. I've also
tried running the server in single-process mode using apache2ctl -X -k
start in order to mimic mpm-winnt but again it doesn't help. I've also
tried the setup on my Ubuntu 10.04 laptop - the problem also occurs so
this happens even with localhost communications (although I haven't
packet-dumped locally yet).
Can anyone provide any insight or point me in a certain direction? I'm
not a TCP/IP expert and I'm not even sure if the TCP packet results are
Apache's doing or the kernel's. Any help would be extremely appreciated.
Cheers,
Keith
---------------------------------------------------------------------
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-unsubscr...@httpd.apache.org
" from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org