koslab / PlatoCDP

Plato Content & Data Platform, Plone distribution for Enterprise Data/Information/Knowledge Portal.
4 stars 1 forks source link

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

Open natea opened 10 years ago

natea commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 notifications@github.com 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 https://github.com/koslab/PlatoCDP/issues/1#issuecomment-60568346.

nate@appsembler.com +1 (617) 517-4953 http://twitter.com/natea | http://linkedin.com/in/natea

kagesenshi commented 10 years ago

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 commented 9 years ago

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 commented 9 years ago

no varnish yet however