Re: lua socket settimeout has no effect

2018-08-12 Thread Sachin Shetty
Hi Cyril, Thankyou for the response. Please ignore the second timeout setting, I was testing different things. I have changed the lua code as you suggested - thanks for the hint there. function get_from_gds(key) local sock = core.tcp() -- Connect timeout after patch

Re: lua socket settimeout has no effect

2018-08-12 Thread Cyril Bonté
Le 12/08/2018 à 18:21, Sachin Shetty a écrit : Hi Cyril, I have created a very simple config to reproduce this. This config always read timesout in 9 seconds. I think there are 3 issues. [...] function get_from_gds(key) [...]     local sock = core.tcp()     -- Connect timeout after

Re: lua socket settimeout has no effect

2018-08-12 Thread Sachin Shetty
Hi Cyril, I have created a very simple config to reproduce this. This config always read timesout in 9 seconds. To create a timingout service, you can just use nc as follows nc -l Haproxy Conf: global pidfile

Re: HaProxy question

2018-08-12 Thread Igor Cicimov
Hi Jonathan, I'll keep bottom posting otherwise the thread will become a real mess and very hard to follow historically. On Sun, Aug 12, 2018 at 9:19 PM Jonathan Opperman wrote: > Hi Igor, > > Not 100% sure what you mean here with the redirect to the proxy bind on > that port? What will the

Re: HaProxy question

2018-08-12 Thread Jonathan Opperman
Hi Igor, Not 100% sure what you mean here with the redirect to the proxy bind on that port? What will the rest of the bind look like on the front-end config in haproxy? Cheers Jonathan On Tue, Aug 7, 2018 at 1:16 PM Igor Cicimov wrote: > > > On Tue, Aug 7, 2018 at 10:53 AM, Igor Cicimov < >

Re: HaProxy question

2018-08-12 Thread Jonathan Opperman
Hi Igor, Thanks for the suggestion, only saw your reply now as gmail decided to route emails to the spam folder. Tried this and got: Aug 12 18:34:20 vm-proxy-01.prod-01 haproxy[8502]: [ALERT] 223/183420 (8502) : http frontend 'ft_https_demo' (/etc/haproxy/haproxy.cfg:86) tries to use

Re: lua socket settimeout has no effect

2018-08-12 Thread Cyril Bonté
Hi, Le 12/08/2018 à 08:41, Sachin Shetty a écrit : Hi Cyril, Any idea how I can deterministically set the readtimeout as well? Well, currently I can't reproduce this at all. Can you provide some more details ? or even a full configuration providing the test case ? From the tests I've made,

Re: HaProxy question

2018-08-12 Thread Jonathan Opperman
Hi Jonathan, Thanks for the pointer, correcto mode, found the replies in my spam folder. Appreciate it.. Cheers Jono On Sat, 11 Aug 2018, 17:44 Jonathan Matthews, wrote: > Did you miss the two mails from Igor containing suggestions? > > Like this email, they went both to the list and directly

Re: lua socket settimeout has no effect

2018-08-12 Thread Sachin Shetty
Hi Cyril, Any idea how I can deterministically set the readtimeout as well? Thanks Sachin On Fri, Jul 27, 2018 at 1:23 PM, Sachin Shetty wrote: > Thankyou Cyril, your patch fixed the connect issue. > > Read timeout still seems a bit weird though, at settimeout(1), readtimeout > kicks in at

race condition causing some corruption in lua socket service response

2018-08-12 Thread Sachin Shetty
Hi, We are using a http-req lua action to dynamically set some app specific metadata headers. The lua handler connects to a upstream memcache like service over tcp to fetch additional metadata. Here is a simplified config: function get_from_gds(txn) local key = txn.sf:req_fhdr("host")