Re: [squid-users] shared_memory_locking failed to mlock

2018-07-17 Thread Gordon Hsiao
Turns out it is a ulimit-related issue, I bumped default mlock limit to a large value and now I can start squid with memory-locked. yes strace is only for syscalls, while ltrace shows all library calls. Thanks for the help! Gordon On Mon, Jul 16, 2018 at 6:38 PM Alex Rousskov < rouss...@measure

Re: [squid-users] shared_memory_locking failed to mlock

2018-07-16 Thread Alex Rousskov
On 07/16/2018 05:08 PM, Gordon Hsiao wrote: > On a x86/64bit ubuntu machine if I set 'workers 4' and run: > squid --foreground -f /etc/squid.conf 2>&1 |grep mlock >   mlock(0x7f2e5bfb2000, 8)                = 0 >   mlock(0x7f2e5bf9f000, 73912)            = -1 ENOMEM > squid -N -f /etc/squid.conf

Re: [squid-users] shared_memory_locking failed to mlock

2018-07-16 Thread Gordon Hsiao
On a x86/64bit ubuntu machine if I set 'workers 4' and run: squid --foreground -f /etc/squid.conf 2>&1 |grep mlock mlock(0x7f2e5bfb2000, 8)= 0 mlock(0x7f2e5bf9f000, 73912)= -1 ENOMEM (Cannot allocate memory) squid -N -f /etc/squid.conf 2>& |grep mlock mlock(0x7f8e

Re: [squid-users] shared_memory_locking failed to mlock

2018-07-16 Thread Alex Rousskov
On 07/15/2018 08:47 PM, Gordon Hsiao wrote: > Just upgraded squid to 4.1, however if I enabled shared_memory_locking I > failed to start squid: > > "FATAL: shared_memory_locking on but failed to > mlock(/squid-tls_session_cache.shm, 2101212): (12) Out of memory" > How do I know how much memory it

Re: [squid-users] shared_memory_locking failed to mlock

2018-07-16 Thread Gordon Hsiao
after increased shared memory(/dev/shm on linux), it does not help, still don't know why mlock fails, or how much memory it needs to mlock to avoid failing. On Sun, Jul 15, 2018 at 9:47 PM Gordon Hsiao wrote: > Just upgraded squid to 4.1, however if I enabled shared_memory_locking I > failed to

[squid-users] shared_memory_locking failed to mlock

2018-07-15 Thread Gordon Hsiao
Just upgraded squid to 4.1, however if I enabled shared_memory_locking I failed to start squid: "FATAL: shared_memory_locking on but failed to mlock(/squid-tls_session_cache.shm, 2101212): (12) Out of memory" How do I know how much memory it is trying to mlock? is 2101212(~2MB) the shm size of no