0

Yesterday oracle user had an error when he tried to login via ssh "error: do_exec_pty: fork: Resource temporarily unavailable". After I increased nproc soft limit he logged in. Then I started to reading about soft and hard limits and basing on this thread and the answer "The hard limit is the ceiling for the soft limit."

Why OS can't manage soft limit itself and change soft limit "a bit" just to allow user to log via ssh?

oracle  soft    nproc   8096
oracle  hard    nproc   49152
mustafa
  • 1
  • 1
  • Why cant my lender just increase my credit card limit automatically "a bit" to allow you to make that extra purchase.. – Matthew Ife May 27 '22 at 06:48
  • when I reach my daily limit of my credit card I go to mobile app to increase limit, make extra purchase, go to mobile app again and decrease limit to previous value :) I still keep in mind that I didn't even touch hard limit. – mustafa May 27 '22 at 10:37
  • precisely. YOU do that. Not the lender. – Matthew Ife May 27 '22 at 11:09

1 Answers1

1

Instead of merely increasing your maximum, a more pertinent question might be why should I increase my maximum and when?

  • If oracle has 8096 tasks running simultaneously, is that normal and a expected outcome?
  • Has the DBA explained why it does this and what conditions lead to it?
  • Do you agree that this behaviour should be normal for this data load?

If it is, you can increase the limit knowing what the point of the number of tasks are, as you've factored it into the running design of its configuration.

The default limits tend to be set abnormally high for most work loads, if you're exceeding them the first thing I'd be asking is why you would be doing so and if there is another way to do what you're doing that isn't as resource greedy.

You should think of the soft limits as a means for a user to recognise an anomaly in whatever they are running and respond by increasing it manually (hence potentially understanding why the resource is so large) or fixing the underlying issue that uses up so many resources.

Also, some programs do automatically raise the limits outside of the hard limit when they start (looking at you MySQL open file limit). Again as its expected in its design to exceed most normal workloads.

Matthew Ife
  • 22,927
  • 2
  • 54
  • 71