LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Java JSP/Servlet > LSWS 4.0.x and AJP app

Reply
 
Thread Tools Display Modes
  #1  
Old 08-26-2009, 01:58 AM
karcher karcher is offline
New Member
 
Join Date: Aug 2009
Location: Szczecin / Poland
Posts: 1
Default LSWS 4.0.x and AJP app

I'm running into some nasty connection errors (which lead to 503 occuring frequently on my site) with an Django app running trough flup's AJP protocol and a LSWS connector.

Log from flup-ajp django daemon:
Code:
2009-08-26 10:40:38 : Exception caught in Connection
Traceback (most recent call last):
  File "/var/lib/python-support/python2.4/flup/server/ajp_base.py", line 618, in run
    self.processInput()
  File "/var/lib/python-support/python2.4/flup/server/ajp_base.py", line 649, in processInput
    self._forwardRequest(pkt)
  File "/var/lib/python-support/python2.4/flup/server/ajp_base.py", line 707, in _forwardRequest
    req.run()
  File "/var/lib/python-support/python2.4/flup/server/ajp_base.py", line 498, in run
    self._conn.writePacket(pkt)
  File "/var/lib/python-support/python2.4/flup/server/ajp_base.py", line 740, in writePacket
    pkt.write(self._sock)
  File "/var/lib/python-support/python2.4/flup/server/ajp_base.py", line 312, in write
    self._sendall(sock, CONTAINER_PREFIX + struct.pack('>H', self.length))
  File "/var/lib/python-support/python2.4/flup/server/ajp_base.py", line 298, in _sendall
    sent = sock.send(data)
error: (32, 'Broken pipe')
Vhost's external app config:
Code:
Type: Servlet engine
Address: 127.0.0.1:3033
Max Connections: 100
Connection Keepalive Timeout: -1
Initial Request Timeout: 60
Retry Timeout: 3
The flup-ajp django process is run by this command:
Code:
/usr/bin/python $DIR/manage.py runfcgi method=threaded daemonize=false \
        maxrequests=0 \
        maxchildren=300 \
        minspare=30 \
        maxspare=60 \
        protocol=ajp \
        host=127.0.0.1 port=3033
I'm suspecting, that LSWS is the cause here, as using apache with mod-jk on the same flup-ajp django instance (yes! it's lightning fast) yelds no errors at all.

The connection count from LSWS to the app floats between the max allowed connection limit in LSWS while operating normally (no 503 errors), and drops to:
Code:
 ~$ netstat -a -n | grep 3033 | grep ESTABLISHED  | wc -l
29
while the 503 errors occurs.

The bug has been observed on every 4.0.x version. Currently testing with 3.x

Help, please?

Last edited by karcher; 08-26-2009 at 02:06 AM.. Reason: additional info
Reply With Quote
  #2  
Old 08-27-2009, 12:53 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
I think there is somehting that LSWS does not like in the AJP packet sent by flup-ajp, so web server side closed the connection.
If it can be reproduced with certain URL, you can grep 503 error in access log see if it only happen to certain URL.
You can use tcpdump to capture the data exchanged between LSWS and flup-ajp.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:15 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.