LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-27-2017, 09:31 AM   #1
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Rep: Reputation: 31
Changing open file limit on a specific process PID


Morning, I am getting connection errors using mosquitto due to connection failures. This is being tested on an AWS t2.small machine, Ubuntu 14.04LTS and the filesystem changes for the limits reflect fine;

ulimit -Hn
64000

ulimit -Sn
64000

/etc/sysctl.conf has the following;
fs.file-max = 10000000
fs.nr_open = 10000000

/etc/security/limits.conf has the following;
* soft nofile 64000
* hard nofile 64000
root soft nofile 64000
root hard nofile 64000

Both PAM files have been updated as well to allow the changes. So here is the problem;

I have tried running the process as the default mosquitto user as well as root with the same results. Ulimit (as shown above) is allowing the 64k file, but after 1k connections there failing and a check at the process level is the issue;

cat /proc/pid/limits shows;
Max open files 1024 4096 files

So, stuck on how to change the per process open file limit. Thanks for any help/suggestions.
 
Old 07-30-2017, 11:23 AM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
I know nothing of this (sorry), but a quick web search suggests the prlimit command might do the trick.

However, it allows you to set limits for a process with a specific pid - I'm not sure that's what you're looking for.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can process pid cross max file open limit? gaurav_s Linux - Software 2 06-05-2015 09:13 AM
Can I assign a Command to a specific PID so I can kill a predetermined PID johnmccarthy Linux - Newbie 1 11-03-2011 08:41 AM
New open file size limit is getting reflected in the specific user srajeshkumar Linux - Server 6 05-18-2011 08:32 AM
[SOLVED] Bash script to get PID of a specific process. arashi256 Linux - Newbie 6 08-23-2010 07:45 AM
Want to limit Memory to a specific Process tstaples Linux - General 3 01-26-2005 01:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration