KomAjpServer

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

KomAjpServer

Udo Schneider
All,

I'm currently evaluating KomAjpServer
(http://www.squeaksource.com/KomAjpServer) as an alternative way to
doing regular reverse-proxying with apache.

It seemed to work w/o any problems until Linux complained about to many
open files. Checking with lsof it seems that KomAjpServer does not keep
a number of sockets open but instead closes sockets after one request -
so I'm accumulating a lot of half open sockets.

Does anybody have any experience with this?

CU,

Udo

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: KomAjpServer

Philippe Marschall
2009/12/9 Udo Schneider <[hidden email]>:

> All,
>
> I'm currently evaluating KomAjpServer
> (http://www.squeaksource.com/KomAjpServer) as an alternative way to doing
> regular reverse-proxying with apache.
>
> It seemed to work w/o any problems until Linux complained about to many open
> files. Checking with lsof it seems that KomAjpServer does not keep a number
> of sockets open but instead closes sockets after one request - so I'm
> accumulating a lot of half open sockets.

That's not really the idea behind AJP:
"To cut down on the expensive process of socket creation, the web
server will attempt to maintain persistent TCP connections to the
servlet container, and to reuse a connection for multiple
request/response cycles"

 [1] http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: KomAjpServer

Göran Krampe
In reply to this post by Udo Schneider
Udo Schneider wrote:
> All,
>
> I'm currently evaluating KomAjpServer
> (http://www.squeaksource.com/KomAjpServer) as an alternative way to
> doing regular reverse-proxying with apache.

Perhaps it does not fit at all, but you also have Blackfoot (SimpleCGI
implementation) as an alternative way of serving Seaside:

http://map.squeak.org/packagebyname/blackfoot

It was a while since I worked on it but last time I played it worked
fine with Cherokee and it performs better than plain Kom, for some
reason it especially seems to handle load much, much more gracefully.

Nginx (lemme take a look... nah, still not fixed) has a rather messy
implementation, and it is a largely unmaintained addon, and although I
fixed a few bugs in the Nginx module (!) it never made it into upstream
(although I sent it). So unfortunately I don't think Nginx is a good
server for SCGI.

Lighttpd and Apache should hopefully work fine, but I haven't tested them.

regards, Göran

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: KomAjpServer

Udo Schneider
In reply to this post by Philippe Marschall
Philippe Marschall schrieb:
> That's not really the idea behind AJP:
> "To cut down on the expensive process of socket creation, the web
> server will attempt to maintain persistent TCP connections to the
> servlet container, and to reuse a connection for multiple
> request/response cycles"
The was my understanding of AJP as well - however it seems that
something is going wrong. Either on the Apache or on the seaside side.
Even without a connection the number of half-open sockets increases over
time.

The same apache with a tomcat backend works fine - so I'll start
digging/debugging on the smalltalk side.

CU,

Udo

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: KomAjpServer

Udo Schneider
In reply to this post by Göran Krampe
Göran Krampe schrieb:
> Perhaps it does not fit at all, but you also have Blackfoot (SimpleCGI
> implementation) as an alternative way of serving Seaside:
>
> http://map.squeak.org/packagebyname/blackfoot
I'll check it - thanks.

> It was a while since I worked on it but last time I played it worked
> fine with Cherokee and it performs better than plain Kom, for some
 > [...]
> Nginx (lemme take a look... nah, still not fixed) has a rather messy
> implementation, and it is a largely unmaintained addon, and although I
 > [...]
Unfortunately Apache is a must in my setup.

CU,

Udo

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Re: KomAjpServer

Tobias Pape
In reply to this post by Udo Schneider

Am 2009-12-10 um 09:44 schrieb Udo Schneider:

> Philippe Marschall schrieb:
>> That's not really the idea behind AJP:
>> "To cut down on the expensive process of socket creation, the web
>> server will attempt to maintain persistent TCP connections to the
>> servlet container, and to reuse a connection for multiple
>> request/response cycles"
> The was my understanding of AJP as well - however it seems that something is going wrong. Either on the Apache or on the seaside side. Even without a connection the number of half-open sockets increases over time.
>
> The same apache with a tomcat backend works fine - so I'll start digging/debugging on the smalltalk side.
>

You might consider talking to
Christopher.Schuster at student.hpi.uni-potsdam.de
who once started inplementing KomAJP.

So Long,
        -Tobias

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Re: KomAjpServer

Göran Krampe
In reply to this post by Udo Schneider
Udo Schneider wrote:
> Unfortunately Apache is a must in my setup.

Then you can try using mod_scgi! I never did that, but would be cool to
know how it works out.

regards, Göran

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: KomAjpServer

Udo Schneider
In reply to this post by Tobias Pape
Tobias Pape schrieb:
> You might consider talking to
> Christopher.Schuster at student.hpi.uni-potsdam.de
Thanks. Will do.

CU,

Udo

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: KomAjpServer

Udo Schneider
In reply to this post by Göran Krampe
Göran Krampe schrieb:
> Then you can try using mod_scgi! I never did that, but would be cool to
> know how it works out.
I'll try.

CU,

Udo


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Re: KomAjpServer

Philippe Marschall
In reply to this post by Udo Schneider
2009/12/10 Udo Schneider <[hidden email]>:

> Philippe Marschall schrieb:
>>
>> That's not really the idea behind AJP:
>> "To cut down on the expensive process of socket creation, the web
>> server will attempt to maintain persistent TCP connections to the
>> servlet container, and to reuse a connection for multiple
>> request/response cycles"
>
> The was my understanding of AJP as well - however it seems that something is
> going wrong. Either on the Apache or on the seaside side.

Apache side is very unlikely. That part has seen and is still seeing a
ton of action. Are you on mod_jk or mod_proxy_ajp?

> Even without a
> connection the number of half-open sockets increases over time.
>
> The same apache with a tomcat backend works fine - so I'll start
> digging/debugging on the smalltalk side.

Wireshark supports AJP13 :-)

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: KomAjpServer

Udo Schneider
Philippe Marschall schrieb:
> Apache side is very unlikely. That part has seen and is still seeing a
> ton of action. Are you on mod_jk or mod_proxy_ajp?
I'm currently using mod_proxy_ajp.

> Wireshark supports AJP13 :-)
That's good to know - I have to check whether I can capture packets on
the loopback interface with tcpdump. The machine I (am forced to) work
with is a stripped down linux machine for "security purposes" ... it's
amazing how much was stripped .... :-(

Thanks for your help.

CU,

Udo

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: KomAjpServer

Udo Schneider
Udo Schneider schrieb:

> Philippe Marschall schrieb:
>> Apache side is very unlikely. That part has seen and is still seeing a
>> ton of action. Are you on mod_jk or mod_proxy_ajp?
> I'm currently using mod_proxy_ajp.
>
>> Wireshark supports AJP13 :-)
> That's good to know - I have to check whether I can capture packets on
> the loopback interface with tcpdump. The machine I (am forced to) work
> with is a stripped down linux machine for "security purposes" ... it's
> amazing how much was stripped .... :-(
>
The WireShark idea was an excellent one!!!! I can now clearly see that
KomAjpServer handles one request and then "somebody in Squeak"
terminates the connection (TCP-FIN) - so I'd say it's definitely
something on the Squeak Side.

Let the debugging begin :-)

CU,

Udo

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside