You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Luca Capacci <lu...@gmail.com> on 2016/08/29 10:09:16 UTC

[users@httpd] Apache websocket proxy drops connections

Hi,

I'm trying to proxy a websocket through Apache 2.4.7 (running on Ubuntu). The connection is correctly established but if the browser or the server don't send each other data for some time (a minute more or less) new messages coming from the server are not delivered to the browser.
Furthermore, nor the browser or the service on the server seem to realize the connection is somehow broken (they don't throw any error at all).

How can I configure the server in order to avoid this issue?

This is my configuration (the keepalive=On timeout=9999 ttl=9999 part and the TimeOut 99999 ProxyTimeout 99999 part are the result of some failed attempts to fix the issue):

TimeOut 99999
ProxyTimeout 99999
ProxyRequests Off
ProxyPass /somepath ws://127.0.0.1:6080/ retry=60 keepalive=On timeout=9999 ttl=9999
ProxyPassReverse /somepath ws://127.0.0.1:6080/ retry=60

If I istruct javascript to connect directly to the service (which is on the port 6080) the are no issues, so I’m pretty sure the problem is related to Apache.

If i instruct javascript on my webpage to send some data to the server every 30 seconds the connections doesn’t die. So, I think the issue is related to some idle timeout setting, but I can’t figure out which is the right parameter I need to modify.

Thanks,
Luca

Re: [users@httpd] Apache websocket proxy drops connections

Posted by Erik Dobák <er...@gmail.com>.
Hi Luca,

what connection does time out. how do you establish it? what commands
do you use?

E

On 29 August 2016 at 12:09, Luca Capacci <lu...@gmail.com> wrote:
> Hi,
>
> I'm trying to proxy a websocket through Apache 2.4.7 (running on Ubuntu).
> The connection is correctly established but if the browser or the server
> don't send each other data for some time (a minute more or less) new
> messages coming from the server are not delivered to the browser.
> Furthermore, nor the browser or the service on the server seem to realize
> the connection is somehow broken (they don't throw any error at all).
>
> How can I configure the server in order to avoid this issue?
>
> This is my configuration (the keepalive=On timeout=9999 ttl=9999 part and
> the TimeOut 99999 ProxyTimeout 99999 part are the result of some failed
> attempts to fix the issue):
>
> TimeOut 99999
> ProxyTimeout 99999
> ProxyRequests Off
> ProxyPass /somepath ws://127.0.0.1:6080/ retry=60 keepalive=On timeout=9999
> ttl=9999
> ProxyPassReverse /somepath ws://127.0.0.1:6080/ retry=60
>
> If I istruct javascript to connect directly to the service (which is on the
> port 6080) the are no issues, so I’m pretty sure the problem is related to
> Apache.
>
> If i instruct javascript on my webpage to send some data to the server every
> 30 seconds the connections doesn’t die. So, I think the issue is related to
> some idle timeout setting, but I can’t figure out which is the right
> parameter I need to modify.
>
> Thanks,
> Luca

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org