[Samba] TOO MANY OPEN FILES when adding printer driver

Peter Koch sambamailinglist at gmail.com
Sun Dec 8 20:33:53 UTC 2024


Dear Samba experts,

I have 10 rpcd_spoolss processes running. Here's the
output o prlimit for one of them:

# prlimit -p628
RESOURCE   DESCRIPTION                             SOFT      HARD UNITS
AS         address space limit                unlimited unlimited bytes
CORE       max core file size                         0 unlimited bytes
CPU        CPU time                           unlimited unlimited seconds
DATA       max data size                      unlimited unlimited bytes
FSIZE      max file size                      unlimited unlimited bytes
LOCKS      max number of file locks held      unlimited unlimited locks
MEMLOCK    max locked-in-memory address space     65536     65536 bytes
MSGQUEUE   max bytes in POSIX mqueues            819200    819200 bytes
NICE       max nice prio allowed to raise             0         0
NOFILE     max number of open files                 270     16384 files
NPROC      max number of processes               579418    579418 processes
RSS        max resident set size              unlimited unlimited bytes
RTPRIO     max real-time priority                     0         0
RTTIME     timeout for real-time tasks        unlimited unlimited microsecs
SIGPENDING max number of pending signals         579418    579418 signals
STACK      max stack size                       8388608 unlimited bytes

NOFILE has a soft limit of 270 - seems very low to me.

I changed the NOFILE-value for all of my rpcd_spoolss-processes:

# prlimit -n500:16384 -p<pid>

And this fixed my problem.

Kind regards

Peter

Am So., 8. Dez. 2024 um 19:30 Uhr schrieb Peter Koch
<sambamailinglist at gmail.com>:

> Dear Samba experts,
>
> I'm trying to add a printer driver for a Canaon TM-255 plotter
> to out samba4 machine.
>
> While most printer drivers consist of a handful of files, this plotter
> requires 149 driver files.
>
> I'm adding the driver via:
>
> FILES="CNWT10GM.UPD,,CNWUO411.DLL,.... 142 more files"
> rpcclient -U Administrator%nav852 SERV00 -c "adddriver \"Windows x64\"
> \"Canon TM-255:CNWUOM.DLL:CNWT10GM.XPD:CNWUOMUI.DLL:NULL:NULL:$FILES\""
>
> And this fails with WERR_APP_INIT_FAILURE
>
> If I reduce the list of extra files to 116 files everything works fine.
> If the list of extra files has >=117 files the following messages
> show up in /var/samba/log.rpcd_spoolss
>
> [2024/12/08 19:25:42.072125,  0]
> ../../source3/printing/nt_printing.c:1482(move_driver_file_to_download_area)
>   move_driver_file_to_download_area: Unable to rename
> [x64/CPC1RUW1.DLL] to [x64/3/CPC1RUW1.DLL]:
> NT_STATUS_TOO_MANY_OPENED_FILES
> [2024/12/08 19:25:42.073567,  0]
> ../../source3/rpc_server/spoolss/srv_spoolss_nt.c:8716(_spoolss_AddPrinterDriverEx)
>   _spoolss_AddPrinterDriverEx: move_driver_to_download_area failed -
> WERR_APP_INIT_FAILURE
>
> How do I increase the max number of open files for rpcd_spoolss
>
> Kind regards
>
> Peter



More information about the samba mailing list