[Samba] TOO MANY OPEN FILES when adding printer driver

David Disseldorp ddiss at samba.org
Tue Dec 10 03:16:53 UTC 2024


[cc'ing samba-technical list]

Hi Peter,

On Sun, 8 Dec 2024 21:33:53 +0100, Peter Koch via samba wrote:

> Dear Samba experts,
> 
> I have 10 rpcd_spoolss processes running. Here's the
> output o prlimit for one of them:
> 
> # prlimit -p628
...
> NOFILE     max number of open files                 270     16384 files
...
> 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.

Thanks a lot for your report and follow-up.
smbd and winbindd already attempt to manually set RLIMIT_NOFILE limits
based on configuration of "max open files" and "winbind max domain
connections" respectively. I think it'd make sense to also attempt to
raise the limit for Samba rpc daemons.
Would you be able to raise a bugzilla.samba.org ticket for this? That
should ensure that we don't forget about it.

Cheers, David


> 
> 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-technical mailing list