LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-24-2014, 04:47 AM   #1
postcd
Member
 
Registered: Oct 2013
Posts: 527

Rep: Reputation: Disabled
accept: Too many open files - after opening SSH proxyfying


Hello, i enabled ssh proxy on server using this tutorial and after around hour very roughly i started getting these messages in terminal.

Quote:
accept: Too many open files
accept: Too many open files
accept: Too many open files
It was like a flood so i was unable to enter any command. So from VPS host server i did "pkill -f mysshporthere" and it stopped

"lsof" returned something like this:
Quote:
ssh 7755 root 957u IPv4 837165782 0t0 TCP vps.mydomainhere.com:socks->67.198.*.*.CUSTOMER.*.COM:* (FIN_WAIT2)
ssh 7755 root 958u IPv4 839566319 0t0 TCP vps.mydomainhere:socks->67.198.*.*.CUSTOMER.*.COM:* (ESTABLISHED)
...and around 200 similar..
So i want to ask where i can increase this open files limit value, or what do you recommend doing when this flood happen again? thx

----
Moreover im getting flood of:
Code:
channel *: open failed: administratively prohibited: open failed

Last edited by postcd; 04-24-2014 at 09:42 AM.
 
Old 04-24-2014, 08:02 AM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Check your ulimit. The number of open file descriptors allowed for a user by default is only 1024. Note my user is "sam".

Code:
$ ulimit -a sam | grep 'open files'
open files                      (-n) 1024
You can increase the number of open files you have so long as there isn't a hard limit on your account.

Code:
$ ulimit -n 10000 sam
$ ulimit -a sam | grep 'open files'
open files                      (-n) 10000
There's a RedHat article on ulimit which describes it more verbosely which describes checking the system limit for open file descriptors as well as making your change permanent for your user.
 
Old 04-24-2014, 09:56 AM   #3
postcd
Member
 
Registered: Oct 2013
Posts: 527

Original Poster
Rep: Reputation: Disabled
Thx, i tried this now, and i set limit to 200,000

instead im getting flood of errors:
Quote:
channel *: open failed: administratively prohibited: open failed
* = some 4 digit number

when config server firewall is turned off, this message dont happens
 
Old 02-24-2017, 07:31 AM   #4
ghp
LQ Newbie
 
Registered: Apr 2013
Location: Sint-Denijs, België
Distribution: Devuan
Posts: 14

Rep: Reputation: Disabled
Quote:
Originally Posted by postcd View Post
Thx, i tried this now, and i set limit to 200,000

instead im getting flood of errors:

* = some 4 digit number

when config server firewall is turned off, this message dont happens

There are other limits a part from ulimit, eg. check:
cat /proc/sys/fs/file-max
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Double Clicking on Open Office files leads to very slow opening NewKubuntuGuy Linux - Software 15 01-17-2012 06:37 PM
[SOLVED] Is there a system call other than 'open' for opening very large files? dariyoosh Programming 6 08-17-2009 05:09 AM
accept() not opening new ports. blackhole123 Linux - Networking 2 12-01-2005 05:31 AM
Opening remote files (during ssh session) with applications on local computer? The_Fed Linux - Newbie 3 05-10-2004 04:20 PM
Opening MS Publisher files in Open Office bigredmed Linux - Software 1 10-25-2003 06:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:49 PM.

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