Re: [DNG] pam_limits or limits.conf different from Debian?

2018-03-02 Thread Irrwahn
Patrick Dunford wrote on 02.03.2018 13:45:
> I did some more tweaking, and basically it looks like I have to set the hard 
> limit higher as well as the soft limit, in /etc/security/limits.conf
> 
> The hard limit in Debian must be set higher somewhere else, because you don't 
> have to set that one in the same file normally.
> 
[cut]

That is consistent with my own observations. On my desktop ASCII 
machine the hard limit for nofile appeared to be set to an arbitrary 
limit of 4096. Unfortunately I, too, have no clue by what mechanism 
this limit is pre-configured.

Note, however, that you can set both the hard and soft limits to 
the same value simultaneously in /etc/security/limits.conf by using 
a '-' (hyphen) in the  field (second column); for example:

 - nofile 32000


Best regards
Urban
-- 
Sapere aude!
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] pam_limits or limits.conf different from Debian?

2018-03-02 Thread Patrick Dunford
I did some more tweaking, and basically it looks like I have to set the 
hard limit higher as well as the soft limit, in /etc/security/limits.conf


The hard limit in Debian must be set higher somewhere else, because you 
don't have to set that one in the same file normally.


Thanks for your assistance.


On 02/03/18 21:28, KatolaZ wrote:

On Fri, Mar 02, 2018 at 02:13:15PM +1300, Patrick Dunford wrote:

No red flags for any of that stuff

On a Debian Buster VM where the increased file limit put into limits.conf
obviously works, the result of ulimit -n comes out the same 1024 as on my
Devuan VM.

The subtleties of why one distro would use one mechanism and a similar one a
different mechanism (apparently) are all the things that frustrate people
like me :)


The thing is that I guess Devuan ASCII has not (willingly) changed any
default in that respect, so the same problem might be present in
debian stretch.

This post:

   
https://stackoverflow.com/questions/46441602/how-to-change-open-files-ulimit-n-permanently-for-normal-user-in-debian-stret

suggests that libpam-systemd seems to ignore /etc/security/limits.conf
by default. The easy way to check is by logging in from a tty, and
looking at:

  $ ulimit -n

I tried it now, setting nofile to 2, and it correctly shows the
new value. Which polkit backend are you using? We might have inherited
an unwanted behaviour in libpam-elogind, possibly.

HND

KatolaZ



___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] pam_limits or limits.conf different from Debian?

2018-03-02 Thread KatolaZ
On Fri, Mar 02, 2018 at 02:13:15PM +1300, Patrick Dunford wrote:
> No red flags for any of that stuff
> 
> On a Debian Buster VM where the increased file limit put into limits.conf
> obviously works, the result of ulimit -n comes out the same 1024 as on my
> Devuan VM.
> 
> The subtleties of why one distro would use one mechanism and a similar one a
> different mechanism (apparently) are all the things that frustrate people
> like me :)
> 

The thing is that I guess Devuan ASCII has not (willingly) changed any
default in that respect, so the same problem might be present in
debian stretch.

This post:

  
https://stackoverflow.com/questions/46441602/how-to-change-open-files-ulimit-n-permanently-for-normal-user-in-debian-stret

suggests that libpam-systemd seems to ignore /etc/security/limits.conf
by default. The easy way to check is by logging in from a tty, and
looking at:

 $ ulimit -n

I tried it now, setting nofile to 2, and it correctly shows the
new value. Which polkit backend are you using? We might have inherited
an unwanted behaviour in libpam-elogind, possibly.

HND

KatolaZ

-- 
[ ~.,_  Enzo Nicosia aka KatolaZ - Devuan -- Freaknet Medialab  ]  
[ "+.  katolaz [at] freaknet.org --- katolaz [at] yahoo.it  ]
[   @)   http://kalos.mine.nu ---  Devuan GNU + Linux User  ]
[ @@)  http://maths.qmul.ac.uk/~vnicosia --  GPG: 0B5F062F  ] 
[ (@@@)  Twitter: @KatolaZ - skype: katolaz -- github: KatolaZ  ]


signature.asc
Description: Digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] pam_limits or limits.conf different from Debian?

2018-03-01 Thread Patrick Dunford
setting a new value via ulimit is not effective and the value does not 
persist in any case.



On 02/03/18 11:50, KatolaZ wrote:

On Fri, Mar 02, 2018 at 12:52:40AM +1300, BWK wrote:

Gidday all

I use qgis and have some projects in it that open over 1000 layers. This
runs up against the file open limit usually preset to 1000 in many distros.

in Debian I can edit /etc/security/limits.conf and set * soft nofile 1
to be able to open the projects with more than 1000 layers without seeing
rejected file open requests and crashes from the software

This seems not to work in Devuan 2.0. Is there a hard limit somewhere else
of less than 1000 or is a different configuration system used (even though
this file is present)

Just a (possibly unrelated) random thought: I guess you have already
had a look at `ulimit -n`, right?

My2Cents

KatolaZ



___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] pam_limits or limits.conf different from Debian?

2018-03-01 Thread Patrick Dunford

No red flags for any of that stuff

On a Debian Buster VM where the increased file limit put into 
limits.conf obviously works, the result of ulimit -n comes out the same 
1024 as on my Devuan VM.


The subtleties of why one distro would use one mechanism and a similar 
one a different mechanism (apparently) are all the things that frustrate 
people like me :)


Thanks


On 02/03/18 12:02, KatolaZ wrote:

On Thu, Mar 01, 2018 at 10:50:23PM +, KatolaZ wrote:

On Fri, Mar 02, 2018 at 12:52:40AM +1300, BWK wrote:

Gidday all

I use qgis and have some projects in it that open over 1000 layers. This
runs up against the file open limit usually preset to 1000 in many distros.

in Debian I can edit /etc/security/limits.conf and set * soft nofile 1
to be able to open the projects with more than 1000 layers without seeing
rejected file open requests and crashes from the software

This seems not to work in Devuan 2.0. Is there a hard limit somewhere else
of less than 1000 or is a different configuration system used (even though
this file is present)

Just a (possibly unrelated) random thought: I guess you have already
had a look at `ulimit -n`, right?



Another possibly unrelated thought: if you have mangled with
/etc/pam.d/login, you must make sure that it contains:

   sessionrequired   pam_limits.so

otherwise /etc/security/limits.conf gets ignored. You might also want
to check if you have anything in /etc/security/limits.d

Also, when you sets new limits the changes will apply only after you
logout and login again.

Also, you could check the system-wide file limit at
/proc/sys/fs/file-max (unlikely to be a problem)

Sorry if I have stated obvious facts at any point.

HTH

KatolaZ



___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] pam_limits or limits.conf different from Debian?

2018-03-01 Thread Patrick Dunford

It returns 1024

So what does that mean?

Thanks


On 02/03/18 11:50, KatolaZ wrote:

On Fri, Mar 02, 2018 at 12:52:40AM +1300, BWK wrote:

Gidday all

I use qgis and have some projects in it that open over 1000 layers. This
runs up against the file open limit usually preset to 1000 in many distros.

in Debian I can edit /etc/security/limits.conf and set * soft nofile 1
to be able to open the projects with more than 1000 layers without seeing
rejected file open requests and crashes from the software

This seems not to work in Devuan 2.0. Is there a hard limit somewhere else
of less than 1000 or is a different configuration system used (even though
this file is present)

Just a (possibly unrelated) random thought: I guess you have already
had a look at `ulimit -n`, right?

My2Cents

KatolaZ



___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] pam_limits or limits.conf different from Debian?

2018-03-01 Thread KatolaZ
On Thu, Mar 01, 2018 at 10:50:23PM +, KatolaZ wrote:
> On Fri, Mar 02, 2018 at 12:52:40AM +1300, BWK wrote:
> > Gidday all
> > 
> > I use qgis and have some projects in it that open over 1000 layers. This
> > runs up against the file open limit usually preset to 1000 in many distros.
> > 
> > in Debian I can edit /etc/security/limits.conf and set * soft nofile 1
> > to be able to open the projects with more than 1000 layers without seeing
> > rejected file open requests and crashes from the software
> > 
> > This seems not to work in Devuan 2.0. Is there a hard limit somewhere else
> > of less than 1000 or is a different configuration system used (even though
> > this file is present)
> 
> Just a (possibly unrelated) random thought: I guess you have already
> had a look at `ulimit -n`, right?
> 


Another possibly unrelated thought: if you have mangled with
/etc/pam.d/login, you must make sure that it contains:

  sessionrequired   pam_limits.so

otherwise /etc/security/limits.conf gets ignored. You might also want
to check if you have anything in /etc/security/limits.d

Also, when you sets new limits the changes will apply only after you
logout and login again.

Also, you could check the system-wide file limit at
/proc/sys/fs/file-max (unlikely to be a problem)

Sorry if I have stated obvious facts at any point.

HTH

KatolaZ

-- 
[ ~.,_  Enzo Nicosia aka KatolaZ - Devuan -- Freaknet Medialab  ]  
[ "+.  katolaz [at] freaknet.org --- katolaz [at] yahoo.it  ]
[   @)   http://kalos.mine.nu ---  Devuan GNU + Linux User  ]
[ @@)  http://maths.qmul.ac.uk/~vnicosia --  GPG: 0B5F062F  ] 
[ (@@@)  Twitter: @KatolaZ - skype: katolaz -- github: KatolaZ  ]


signature.asc
Description: Digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] pam_limits or limits.conf different from Debian?

2018-03-01 Thread KatolaZ
On Fri, Mar 02, 2018 at 12:52:40AM +1300, BWK wrote:
> Gidday all
> 
> I use qgis and have some projects in it that open over 1000 layers. This
> runs up against the file open limit usually preset to 1000 in many distros.
> 
> in Debian I can edit /etc/security/limits.conf and set * soft nofile 1
> to be able to open the projects with more than 1000 layers without seeing
> rejected file open requests and crashes from the software
> 
> This seems not to work in Devuan 2.0. Is there a hard limit somewhere else
> of less than 1000 or is a different configuration system used (even though
> this file is present)

Just a (possibly unrelated) random thought: I guess you have already
had a look at `ulimit -n`, right?

My2Cents

KatolaZ

-- 
[ ~.,_  Enzo Nicosia aka KatolaZ - Devuan -- Freaknet Medialab  ]  
[ "+.  katolaz [at] freaknet.org --- katolaz [at] yahoo.it  ]
[   @)   http://kalos.mine.nu ---  Devuan GNU + Linux User  ]
[ @@)  http://maths.qmul.ac.uk/~vnicosia --  GPG: 0B5F062F  ] 
[ (@@@)  Twitter: @KatolaZ - skype: katolaz -- github: KatolaZ  ]


signature.asc
Description: Digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] pam_limits or limits.conf different from Debian?

2018-03-01 Thread BWK

Gidday all

I use qgis and have some projects in it that open over 1000 layers. This 
runs up against the file open limit usually preset to 1000 in many distros.


in Debian I can edit /etc/security/limits.conf and set * soft nofile 
1 to be able to open the projects with more than 1000 layers without 
seeing rejected file open requests and crashes from the software


This seems not to work in Devuan 2.0. Is there a hard limit somewhere 
else of less than 1000 or is a different configuration system used (even 
though this file is present)


contents below with my line added as the last line

# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#            
#
#Where:
# can be:
#        - a user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#        - the wildcard %, can be also used with %group syntax,
#                 for maxlogin limit
#        - NOTE: group and wildcard limits are not applied to root.
#          To apply a limit to the root user,  must be
#          the literal username root.
#
# can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
# can be one of the following:
#        - core - limits the core file size (KB)
#        - data - max data size (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open files
#        - rss - max resident set size (KB)
#        - stack - max stack size (KB)
#        - cpu - max CPU time (MIN)
#        - nproc - max number of processes
#        - as - address space limit (KB)
#        - maxlogins - max number of logins for this user
#        - maxsyslogins - max number of logins on the system
#        - priority - the priority to run user process with
#        - locks - max number of file locks the user can hold
#        - sigpending - max number of pending signals
#        - msgqueue - max memory used by POSIX message queues (bytes)
#        - nice - max nice priority allowed to raise to values: [-20, 19]
#        - rtprio - max realtime priority
#        - chroot - change root to directory (Debian-specific)
#
#          
#

#*               soft    core            0
#root            hard    core            10
#*               hard    rss             1
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#ftp             -       chroot          /ftp
#@student        -       maxlogins       4

# End of file
*        soft    nofile        1

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng