Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

/etc/init.d/varnish: line 54: ulimit: open files: cannot modify limit: Operation not permitted #1

Open
natea opened this issue Oct 26, 2014 · 6 comments

Comments

@natea
Copy link

natea commented Oct 26, 2014

I attempted to install PlatoCDP using the instructions on your website, and ran into a couple problems around ulimit. (see below)

What's weird is that when I run 'ulimit' it says that it's set to 'unlimited'
bash-4.1# ulimit
unlimited

What are the minimal memory requirements to run PlatoCDP? I was trying to get it running in a Docker container, so it's possible that the default memory allotted was too low. The good news is that Plone/Zope seem to be starting up w/o any complaints.

bash-4.1# cp /var/www/platocdp/etc/haproxy.cfg /etc/haproxy.cfg
bash-4.1# cp /var/www/platocdp/etc/varnish.vcl /etc/varnish/default.vcl
bash-4.1# service varnish start
Starting varnish HTTP accelerator: /etc/init.d/varnish: line 54: ulimit: open files: cannot modify limit: Operation not permitted
/etc/init.d/varnish: line 57: ulimit: max locked memory: cannot modify limit: Operation not permitted
                                                           [  OK  ]
bash-4.1# service haproxy start
Starting haproxy: [WARNING] 298/202854 (515) : [/usr/sbin/haproxy.main()] Cannot raise FD limit to 8017.
[WARNING] 298/202854 (515) : [/usr/sbin/haproxy.main()] FD limit (1024) too low for maxconn=4000/maxsock=8017. Please raise 'ulimit-n' to 8017 or more to avoid any trouble.
                                                           [  OK  ]
bash-4.1# service platocdp start
Starting ZEO server
. 
daemon process started, pid=532
Starting instance 1
. 
daemon process started, pid=538
Starting instance 2
. 
daemon process started, pid=543
Starting instanceworker 1
. 
daemon process started, pid=553
@kagesenshi
Copy link
Member

Hi Natea,

is this docker running on openshift or something? .. there might be ulimit on number of inodes .. Plone itself extracts a lot of files into the installation, I used to face ulimit issue on inode on OpenShift because of that ..

Regards

@kagesenshi
Copy link
Member

oh wait .. reading the error again .. that looks like file descriptor limits ... try checking if you can increase that ..

http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/
(this reminds me of my IRC days)

@natea
Copy link
Author

natea commented Oct 27, 2014

bash-4.1# cat /proc/sys/fs/file-max

202174

bash-4.1# ulimit -Hn

4096

bash-4.1# ulimit -Sn

1024

bash-4.1# sysctl -w fs.file-max=100000

error: "Read-only file system" setting key "fs.file-max"

It's a Docker container, running under boot2docker (not OpenShift).

On Mon, Oct 27, 2014 at 5:40 AM, Izhar Firdaus [email protected]
wrote:

oh wait .. reading the error again .. that looks like file descriptor
limits ... try checking if you can increase that ..

http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/
(this reminds me of my IRC days)


Reply to this email directly or view it on GitHub
#1 (comment).

[email protected]
+1 (617) 517-4953
http://twitter.com/natea | http://linkedin.com/in/natea

@kagesenshi
Copy link
Member

ah ... hurm .. the soft ulimit is 1024, hard limit is 4096 ... while haproxy seems to be expecting 4000

i'm not that familiar on how ulimit settings work on docker yet .. probably its using the host's limit (thus the permission issue)?

are you using the default maxconn value on platocdp haproxy (which is only 1000) .. or some other value? .. perhaps playing around with haproxy.cfg maxconn and see if it starts on docker?

for varnish you might want to checkout https://wikitech.wikimedia.org/wiki/Varnish and see which settings you can play around ..

the issue here seems to be varnish and haproxy running on docker lack the priviledge for it to change ulimit ... rather than plone/platocdp itself .

@kagesenshi
Copy link
Member

Hi Natea,

I just created docker configurations for latest platocdp, they work nicely now

https://github.com/koslab/PlatoCDP/tree/master/docker
https://github.com/koslab/PlatoCDP/tree/master/docker/platocdp/fig.yml

@kagesenshi
Copy link
Member

no varnish yet however

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants