Re: HAProxy - Server Timeout and Client Timeout

2018-06-06 Thread Jarno Huuskonen
Hi,

On Tue, Jun 05, Martel, Michael H. wrote:
> We're running HAproxy 1.5.18 on RedHat Enterprise 7.4, as the load balancer 
> for our LMS (Moodle).  We have found that the course backup feature in Moodle 
> will return a 5xx error on some backups.  We have determined that the 
> "timeout server" value needed to be increased.

Do these backup requests have specific urls that you can match with acl ?

If you use separate backend for moodle backups then it should be
possible to increase timeout server for just the backup requests.

Something like
frontend fe_moodle
  acl backup_req path_sub /something/backup
  use_backend moodle_backup if backup_req
  default_backend moodle
...
backend moodle
  timeout server 1m
...

backend moodle_backup
  timeout server 12m
  server moodle1 ... track moodle/moodle1 ...
  server moodle2 ... track moodle/moodle2 ...

> Initially we were using a "timeout client 1m" and "timeout server 1m" .  
> Adjusting the server to "timeout server 12m" fixes the problem and does not 
> appear to introduce any other issues in our testing.
> 
> I can't see any reason that I should have the "timeout client" and the 
> "timeout server" set to the same value.
> 
> Is there anything I should watch out for after increasing the "timeout 
> server" by such a large amount ?

Probably not, but AFAIK if the backend server "dies" after haproxy has
forwarded the request (and before server responds) then client has to
wait for timeout server (in reality I think everyone will just click
stop or reload instead of waiting for the really long timeout).

-Jarno

-- 
Jarno Huuskonen



Re: HAProxy - Server Timeout and Client Timeout

2018-06-05 Thread Andrew Smalley
HI Michael

We often see the client/server timeouts requiring to be raised as you
have found,

A good default value for client/server timeouts are below and I include the
connect timeout too in milliseconds

timeout connect 4000
timeout client 42000
timeout server 43000

Say for example you run a long report on a website, maybe it will take
5 or 10 min's to
complete so you would raise the server timeout to match the required
maximum timeout where possible
allowing for the report to run and the server, not timeout.

I hope this helps


Andruw Smalley

Loadbalancer.org Ltd.

www.loadbalancer.org
+1 888 867 9504 / +44 (0)330 380 1064
asmal...@loadbalancer.org

Leave a Review | Deployment Guides | Blog


On 5 June 2018 at 20:11, Martel, Michael H.  wrote:
> Greetings!
>
> We're running HAproxy 1.5.18 on RedHat Enterprise 7.4, as the load balancer 
> for our LMS (Moodle).  We have found that the course backup feature in Moodle 
> will return a 5xx error on some backups.  We have determined that the 
> "timeout server" value needed to be increased.
>
> Initially we were using a "timeout client 1m" and "timeout server 1m" .  
> Adjusting the server to "timeout server 12m" fixes the problem and does not 
> appear to introduce any other issues in our testing.
>
> I can't see any reason that I should have the "timeout client" and the 
> "timeout server" set to the same value.
>
> Is there anything I should watch out for after increasing the "timeout 
> server" by such a large amount ?
>
> Thanks!
>
>
>
> Michael
>
> --
>
>   o-
>Michael H. Martel  | Director of Data Center Administration
>michael.mar...@vsc.edu | Systems and Security Administrator
>Vermont State Colleges | PH:802-224-3010 FX:802-224-3035
>
>



HAProxy - Server Timeout and Client Timeout

2018-06-05 Thread Martel, Michael H.
Greetings!

We're running HAproxy 1.5.18 on RedHat Enterprise 7.4, as the load balancer for 
our LMS (Moodle).  We have found that the course backup feature in Moodle will 
return a 5xx error on some backups.  We have determined that the "timeout 
server" value needed to be increased.

Initially we were using a "timeout client 1m" and "timeout server 1m" .  
Adjusting the server to "timeout server 12m" fixes the problem and does not 
appear to introduce any other issues in our testing.

I can't see any reason that I should have the "timeout client" and the "timeout 
server" set to the same value.

Is there anything I should watch out for after increasing the "timeout server" 
by such a large amount ?

Thanks!



Michael

-- 

  o-
   Michael H. Martel  | Director of Data Center Administration
   michael.mar...@vsc.edu | Systems and Security Administrator
   Vermont State Colleges | PH:802-224-3010 FX:802-224-3035