User avatar
KnightOfPi
Posts: 45
Joined: Sun Dec 28, 2014 12:57 pm
Location: Vienna - Austria
Contact: Website

Stack size with ulimit on the RPi 3/Raspbian

Wed Jun 15, 2016 7:47 am

Hi all,

i'm currently trying to understand the ulimit -s command under Raspbian. Reason is i have a pygame parachute segfault when running SimpleCV and i thought increasing the stacksize might help.

As i understand ulimit -s now, it outputs the stack size in kilobyte.
If i enter ulimit -s on my RPi3 with a freshly installed Raspbian, it yields
8192
I can increase that to 16384, but 32768 fails with
-bash: ulimit: stack size: cannot modify limit: Operation not permitted

Now i am confused: if ulimit -s is in kilobyte, why can't i raise it higher then 16Mb?

Thanks for your help!

EDIT:
My system is
Linux raspberrypi 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux
Check out www.knight-of-pi.org for many beginner-friendly tutorials!

Gold-member
Posts: 2
Joined: Sat Aug 19, 2017 1:50 pm

Re: Stack size with ulimit on the RPi 3/Raspbian

Tue Jun 19, 2018 3:15 pm

I haven't found much about this for raspberrypi, but there is more information about this inregards to Linux the max number of file descriptors per process. if you run

Code: Select all

 ulimit -a 
without sudo you will see the soft limits of file descriptors per process. you can set these per user session. for Linux the system-wide limits are set in

Code: Select all

 /etc/security/limits.conf
. I am finding an issue with this error running processes as sudo because it overrides user soft limits on file descriptors.

this link was helpful to me : https://stackoverflow.com/questions/249 ... n-on-linux

I was running into this issue with node with fs.writeStream for long periods of time.

User avatar
KnightOfPi
Posts: 45
Joined: Sun Dec 28, 2014 12:57 pm
Location: Vienna - Austria
Contact: Website

Re: Stack size with ulimit on the RPi 3/Raspbian

Wed Jun 20, 2018 6:14 am

Hi Gold-member,

interesting, thanks!
It's so long ago, i found some solution but can't remember what i did for my issue.

Anyways, totally forgot about the forums, so thanks for reminding me.
Check out www.knight-of-pi.org for many beginner-friendly tutorials!

Return to “Raspbian”

Who is online

Users browsing this forum: ghans and 22 guests