chuckcharlie / cups-avahi-airprint

Docker image for CUPS intended as an AirPrint relay
GNU General Public License v3.0
123 stars 67 forks source link

Cups not starting due to ulimit issue on arm64 #22

Open lesf0 opened 10 months ago

lesf0 commented 10 months ago

Hi!

It seems that on certain configurations cups fails to start with no output because of ulimit setting. Found mentions of that issue here

Adding --ulimit nofile=1024:1024 to the docker run command seems to resolve it.

I submit this issue just to inform you but it would be nice of you to add it to readme file.

chuckcharlie commented 10 months ago

Thanks for this. Could you tell me what OS/host you are running docker in? What was your nofile ulimit prior to this? My brand new ubuntu linux install already had the value set to 1024. You can check using the ulimit -a command:

root@ubuntu-studio:~# ulimit -a
real-time non-blocking time  (microseconds, -R) unlimited
core file size              (blocks, -c) 0
data seg size               (kbytes, -d) unlimited
scheduling priority                 (-e) 0
file size                   (blocks, -f) unlimited
pending signals                     (-i) 38267
max locked memory           (kbytes, -l) 1242540
max memory size             (kbytes, -m) unlimited
open files                          (-n) 1024
pipe size                (512 bytes, -p) 8
POSIX message queues         (bytes, -q) 819200
real-time priority                  (-r) 0
stack size                  (kbytes, -s) 8192
cpu time                   (seconds, -t) unlimited
max user processes                  (-u) 38267
virtual memory              (kbytes, -v) unlimited
file locks                          (-x) unlimited
lesf0 commented 10 months ago

I'm running archlinux on orangepi 5, ulimit is set to unlimited there by default.

% ulimit -a                                                                               -t: cpu time (seconds)              unlimited
-f: file size (blocks)              unlimited
-d: data seg size (kbytes)          unlimited
-s: stack size (kbytes)             8192
-c: core file size (blocks)         unlimited
-m: resident set size (kbytes)      unlimited
-u: processes                       14852
-n: file descriptors                1024
-l: locked-in-memory size (kbytes)  8192
-v: address space (kbytes)          unlimited
-x: file locks                      unlimited
-i: pending signals                 14852
-q: bytes in POSIX msg queues       819200
-e: max nice                        0
-r: max rt priority                 0

% uname -a
Linux orangepi 5.10.110-3+ #1 SMP Thu Apr 20 03:50:14 UTC 2023 aarch64 GNU/Linux