is there a way to increase ulimit ? #38

Closed
opened 2022-12-21 00:13:20 +00:00 by happysalada · 11 comments
happysalada commented 2022-12-21 00:13:20 +00:00 (Migrated from github.com)

I get the following failures when trying to update my system.

building the system configuration...
error (ignored): error: opening directory '/tmp/nix-build-perl-5.36.0-env.drv-4': Too many open files
error (ignored): error: opening directory '/nix/store/lkpm61x3fsckk4cniy4clsgp62wg9xn6-perl-5.36.0-env.drv.chroot': Too many open files
error (ignored): error: opening directory '/nix/store/kqwhbsypilb7g7sky5a6v1l1r1cr89vi-perl-5.36.0-env.drv.chroot/nix/store/0h17z31z87cfggv77bakfk7cdk1r06fr-perl-5.36.0-env/lib/perl5/5.36.0': Too many open files
error: creating pipe: Too many open files

is there an attribute to increase the ulimit ?

I get the following failures when trying to update my system. ``` building the system configuration... error (ignored): error: opening directory '/tmp/nix-build-perl-5.36.0-env.drv-4': Too many open files error (ignored): error: opening directory '/nix/store/lkpm61x3fsckk4cniy4clsgp62wg9xn6-perl-5.36.0-env.drv.chroot': Too many open files error (ignored): error: opening directory '/nix/store/kqwhbsypilb7g7sky5a6v1l1r1cr89vi-perl-5.36.0-env.drv.chroot/nix/store/0h17z31z87cfggv77bakfk7cdk1r06fr-perl-5.36.0-env/lib/perl5/5.36.0': Too many open files error: creating pipe: Too many open files ``` is there an attribute to increase the ulimit ?
MatthewCroughan commented 2022-12-21 09:59:47 +00:00 (Migrated from github.com)

This error is awesome, I love macOS. (maybe I'm speaking too soon.) Maybe we should make an issue label for macOS specific issues.
https://apple.stackexchange.com/questions/32235/how-to-properly-increase-a-ulimit-n-limits

If you do find a solution you can prepend to the command, let me know and I'll implement a fix. With the new Nixinate I'm working on, you'd be able to add this to your preDeployScript, so hang tight!

This error is awesome, I love macOS. (maybe I'm speaking too soon.) Maybe we should make an issue label for macOS specific issues. https://apple.stackexchange.com/questions/32235/how-to-properly-increase-a-ulimit-n-limits If you do find a solution you can prepend to the command, let me know and I'll implement a fix. With the new Nixinate I'm working on, you'd be able to add this to your `preDeployScript`, so hang tight!
MatthewCroughan commented 2022-12-21 10:01:06 +00:00 (Migrated from github.com)

And thank you for making these issue reports, it's really interesting to see the edge cases that you are hitting.

And thank you for making these issue reports, it's really interesting to see the edge cases that you are hitting.
happysalada commented 2022-12-21 23:53:12 +00:00 (Migrated from github.com)

ulimit -n 8196
should do it.
looking forward to the new nixinate!

`ulimit -n 8196` should do it. looking forward to the new nixinate!
happysalada commented 2023-01-20 19:41:15 +00:00 (Migrated from github.com)

did you see my previous comment, I've just ran into the error again. (it's for a deployment that needs a lot of derivations built).

did you see my previous comment, I've just ran into the error again. (it's for a deployment that needs a lot of derivations built).
happysalada commented 2023-02-16 00:46:06 +00:00 (Migrated from github.com)

hey @MatthewCroughan , let me know if there is anything I can do more to help on this one.

hey @MatthewCroughan , let me know if there is anything I can do more to help on this one.
iFreilicht commented 2023-03-31 08:14:31 +00:00 (Migrated from github.com)

@happysalada can't you just run ulimit -n 8196 on your machine? That should fix the issue, right? Alternatively, it seems like buildOn = "remote" could solve this as well (if the target is powerful enough, of course).

Are you proposing that the nixinate script should set the ulimit? Is that even possible inside a sandboxed shell?

@happysalada can't you just run `ulimit -n 8196` on your machine? That should fix the issue, right? Alternatively, it seems like `buildOn = "remote"` could solve this as well (if the target is powerful enough, of course). Are you proposing that the nixinate script should set the ulimit? Is that even possible inside a sandboxed shell?
happysalada commented 2023-03-31 14:42:35 +00:00 (Migrated from github.com)

Im using remote already
The ulimit looks like it doesnt persist between different shells, ive tried setting it in another shell and it didnt affect my deployment

I dont feel too strongly about this issue, as my workaround is just to build less things

Im using remote already The ulimit looks like it doesnt persist between different shells, ive tried setting it in another shell and it didnt affect my deployment I dont feel too strongly about this issue, as my workaround is just to build less things
iFreilicht commented 2023-04-06 21:36:39 +00:00 (Migrated from github.com)

Ah got you. Just to clarify, are you deploying from a MacOS host to a remote Linux machine or from a Linux host to a remote MacOS machine? I do have one of each so could try to replicate and integrate a workaround, it seems straightforward enough.

Ah got you. Just to clarify, are you deploying from a MacOS host to a remote Linux machine or from a Linux host to a remote MacOS machine? I do have one of each so could try to replicate and integrate a workaround, it seems straightforward enough.
happysalada commented 2023-04-06 21:51:25 +00:00 (Migrated from github.com)

Macos host to a linux machine.
My current workaround is to build less stuff at first then to rebuild the rest on the second deploy.
I havent found another way around this problem yet.

Macos host to a linux machine. My current workaround is to build less stuff at first then to rebuild the rest on the second deploy. I havent found another way around this problem yet.
nixinator commented 2023-11-23 04:55:19 +00:00 (Migrated from github.com)

https://unix.stackexchange.com/questions/108174/how-to-persistently-control-maximum-system-resource-consumption-on-mac

now thats a weird and wonderful way to set ulimit!!! Apple , how do make setting a simple configuration option like ulimit so mind numbing difficult.... it's so overly convoluted, it's pure genius!

Anyway, that think apple has a future over 'just running photoshop'... is greatly mistaken.

https://unix.stackexchange.com/questions/108174/how-to-persistently-control-maximum-system-resource-consumption-on-mac now thats a weird and wonderful way to set ulimit!!! Apple , how do make setting a simple configuration option like ulimit so mind numbing difficult.... it's so overly convoluted, it's pure genius! Anyway, that think apple has a future over 'just running photoshop'... is greatly mistaken.

Closed due to fork migration, feel free to reopen.

Closed due to fork migration, feel free to reopen.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tristan/nixinate#38
No description provided.