Max number of streams

Hello,
My application is running out of stdio streams. There is a note in stdio man pages: no more than 255 files may be opened using fopen(), and only file descriptors 0 through 255 can be used in a stream.
The application creates a bunch of sockets (>255) and eventually calls fopen() that is failing because of the 255 limit. The application increases number of file descriptors that a process may create. This helps for socket() and open() calls but not for fopen(). Is there any workaround for this problem (other than use open() instead of fopen()?)
Regards,
--Stas                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Hi
First of all lot depends on which OS you are using. For all 32 bit
OS stdio(3S) the limit is 256. This is because the fd itself is
defined as an unsigned 8 bit value. On Sparc Solaris 7 and beyond with
64 bit option turned on it is 65536 (64K).
Having said that however there are ways to manipulate it. No guarantees that it will work, but try it anyways.
All versions of Solaris (including Solaris 7 64-bit) have a default
"soft" limit of 64 and a default "hard" limit of 1024.
Processes may need to open many files or sockets as file
descriptors. Standard I/O (stdio) library functions have
a defined limit of 256 file descriptors as the fopen() call,
datatype char, will fail if it can not get a file descriptor between
0 and 255.
The open() system call is of datatype "int", removing this limitation.
However, if open() has opened 0-255 file descriptors without closing
any, fopen() will not be able to open any file descriptors as all the
low-numbered ones have been used up. Applications that need to use
many file descriptors to open a large number of sockets, or
other raw files, should be forced to use descriptors
numbered above 256. This allows system functions such as
name services, to work as they depend upon stdio routines.
(See p 368 "Performance and Tuning - Java and the Internet").
There are limitations on the number of file descriptors
available to the current shell and its descendents. (See the ulimit
man page). The maximum number of file descriptors that can
be safely used for the shell and Solaris processes is 1024.
This limitation has been lifted for Solaris 7 64-bit which
can be 64k (65536) as explained before.
Therefore the recommended maximum values to be added to /etc/system
are:
set rlim_fd_cur=1024
set rlim_fd_max=1024
The in the shell :
Use the limit command with csh:
% limit descriptors 1024
Use the ulimit command with Bourne or ksh:
$ ulimit -n 1024
However, some third-party applications need the max raised.
A possible recommendation would be to increase rlim_fd_max,
but not the default (rlim_fd_cur). Then rlim_fd_cur can be
raised on a per-process basis if needed, but the higher setting
for rlim_fd_max doesn't affect all processes.
Let me know how it goes
-Manish
SUN-DTS

Similar Messages

  • 1252 - Max Number of Clients

    I have customer that is looking at deploying 1252 access points. I was wondering what the maximum number of clients that can associate to a single 1252. Does this count differ between 1252s running autonomous and LWAPP? The proposed configuration is using B/G radios at 54Mbps but quoting the A/B/G model for future 802.11n deployment (5Ghz radios would be turned off for now).
    Any information would be greatly appreciated.
    Thx
    Joe

    Its not as simple as the max number of clients but you also have to consider the type of client. Also food RF deisign and survey are critical to maximising client throughput.
    There are rules for existing aps of approx 20-25 max for data. This would be 7 for voice in mixed mode b/g or 14 for g only and 20 for a only.
    The ap can theoretically support many more clients, I think the figure is 256. With very simplistic data transfer such as bar code scanning I have seen as may as 50 clients with no issues.
    As you ar lookig at abg these figures seem realistic.
    With 802.11n you hav more bandwith available, better utilisation of the spectrum and therefore more client but its about being realistic and looking at what you are trying to connect.
    Streaming multimedia would be lower than data only. Data only I would say 50 clients no issues but thats quite a density considering the RF footprint. For voice you are stuck with the above figures as you are still only dealing with abg clients.
    Hope that helps

  • HT204053 Max number of devices on one iTunes account?

    Max number of Devices on a single iTunes account

    Devices or Computers? The former there is no limit. For the latter there is a limit of 5.

  • Is there a max number of names that can be put into Contacts

    is there a max number of names that can be put into Contacts and still have the app work well?

    Yes, there is. It's how many contacts your hard drive can take. So you can fill up the entire computer with nothing but contacts until your HDD/Flash has no space left. So if you have 250GB, it'd be less than if you had 500GB and you'd have more on 750GB.

  • Max number of chars in process message MSEL?

    Hi, what is the max number of characteristics can be used in process message category's MSEL table? Right now, I am using more than 99 characteristics and I get a short dump DYNPRO_FIELD_CONVERSION. Is it really limited to 99 characteristics and if it is true, is there an OSS note to change it to allow more than 99?
    Thanks and points available

    Please make sure that you build a
    multithreaded program first (check with ldd).
    If anyone can tell me the maximum number of threads per process I would
    really appreicate it.
    Also the maximum number of open files per process. It depends on the architecture (x86/SPARC), OS version,
    64 or 32-bit, /etc/system, shell limitations (/usr/bin/ulimit) ...
    Search for "rlim_fd_max / rlim_fd_cur" on docs.sun.com too.
    HTH,
    -vladimir

  • What is the max number of hyperlinks supported in a PDF docment?

    What is the max number of hyperlinks supported in a PDF docment?
    How do I find out how many hyperlinks there are in a PDF document?

    I don't think there's a limit to the number of links you can add to a file...
    This code (taken from the reference files) will report the number of links in your file:
    var numLinks=0;
    for ( var p = 0; p < this.numPages; p++)
    var b = this.getPageBox("Crop", p);
    var l = this.getLinks(p, b);
    console.println("Number of Links on page " + p +" is " + l.length);
    numLinks += l.length;
    console.println("Number of Links in Document is " + numLinks);

  • Max number of Hits Account Identification

    Hi all,
    we are currently having the problem in IC that when somebody try to identify an account of an BP with more that 100 related sold to parties, that no account is displayed because of the standard max number of hits 100.
    I have found the path to customize this in the SPRO but this sentence in the SAP help is making me some headache:
    The higher the number you enter here, the more results the system will search for, and in turn, the more performance is affected. The maximum number of hits that the system allows is 100, which is also the default value.
    I understand the point of the performance, but does this mean that the performance is also affected the account identification of the other BP with less than 100 related sold to parties?
    Can anybody help in this issue?
    We are working on CRM 5.0.
    Regards
    Abosi
    Edited by: Abosi_3li2 on Feb 8, 2012 11:08 AM

    Hello
    The bug of nothing displayed if over 100 accounts are found is solved with [SAP note 1467929|https://service.sap.com/sap/support/notes/1467929.]
    The code you are referring to is:
    IF bpident_profile-max_hits IS INITIAL.
    max_hits = 100.
    ELSE.
    max_hits = bpident_profile-max_hits.
    ENDIF.
    It means that, if blank, 100 hits is considered. You can modify the customizing up to 255 results since that is the limit of accounts to be found.
    Regards
    Joaquin

  • "max number of thread"

    We are running a java web app on a Ubuntu Oracle WebLogic server version 10.3.3.
    The java web app performs long polls with open tcp socket to keep the client connection open. The clients are long polling the WebLogic at 30 seconds.
    Currently we are not able to maintain stability for greater than 24 hours with approximately 200 simultaneous sessions on WebLogic server. Session to me is active client/server tcp connection. We have re-written our application to use continuations, but we are seeing ConcurrentModificationException errors in performance testing.
    Is there any setting in WebLogic for “max number of thread” that can handle?
    Edited by: user9316392 on Jul 8, 2010 11:07 AM

    First, WebLogic since 9.0 has a self-tuning thread pool where WLS will automatically grow and shrink the number of threads based on some internal algorithms. I'm not aware of a hard limit so theoretically there is no max thread count as long as the JVM has memory and WLS thinks more threads will help. You can read up on it here:
    http://www.oracle.com/technology/pub/articles/dev2arch/2006/01/workload-management.html
    Practically, I wouldn't expect more than several hundred threads to be helpful.
    As for your situation, how does WLS become unstable? Out of memory, out of file descriptors, errors on new requests, etc. I think you're going to have to use some JVM tools to see what happens to your JVM over time. Is there a memory leak somewhere, is it non-heap memory, etc. JRockit Mission Control is helpful if running on JRockit. If you're on Sun Hotspot, them presumably you can use some of the Hotspot tools. You'll want to compare the state of the JVM towards the beginning of your load test, but after a slight warm-up period with a snapshot after the load test has been running for a long period of time.

  • Max number of buffers

    For fast image grabbing I wand to store images in the memory of the PC. To do this I use LL ring buffering. The max number of buffers is limited by Labview to 50. I tried to increase this by MAX >>Tools >> IMAQ (like suggested on the site) but Labview keeps setting it back to 50, also after rebooting. How can I get this to a higher value?

    Hi,
    Take a look at this document:
    http://digital.ni.com/public.nsf/websearch/FCA602CDBC4EDCEA86256BB1005AB1F2?OpenDocument
    This limit is no longer a issue in NI-IMAQ 3.0.1, (except for the NI-1408)
    Met vriendelijke groet / Kind regards,
    Karsten
    Applications Engineer
    National Instruments

  • Max number of orders

    Hi,
    I am working on ECC 6.0.
    I have been trying to use the Max number of orders for a Z condition type .
    The Max number of orders it is not working even after reaching the max order even after reaching the max order. If anyone has faced such an issue before kindly help.
    I had set the limits for pricing in the VK11  - additional data- Max number of order But of no use.
    Thanks
    Manoj

    hi,
    pl check if the conditin update field in the condition type definition is ticked or not at V/06.
    regards
    sadhu kishore

  • Max number of simultaneous connections?

    Hi everyone!
    how is possible to determine in advance the max number of simultaneous connection for my FMS?
    thanks!

    Hi,
    Like Jay had mentioned the limitation on the number of connection to server depends on the capability of your server.
    You can get the maximum number of connections made to the server, number of active clients... etc details through Administration APIs.
    'getServerStats' gives you the "total_connects", which is the maximum number of connections made to the server. "connected" property will return the number of active clients to your server at one point. It also has many more statistics for your reference. This api returns the overall information of the server. If you want to get the details for specific vhost, you can use getVHostStats or getActiveVHostStats. To get more details on Administration API, refer your pdf documentation on "Administration API", that gets installed in your system under "$Root\Flash Media Server\documentation\flashmediaserver_3.5_administrationAPI.pdf".
    Regards,
    Janaki L

  • Max number of dataproviders in the same workbook

    Hi,
    Do you know please what is the max number of dataproviders (recommanded by SAP) we can use in the same workbook / Bex analyzer?
    For information, we are in BI 7 based on excel 2003.
    Thx.
    Radj.
    Edited by: Radjech Radjech on Dec 3, 2010 12:24 PM

    One suggestion is:
    Each tab (copy of the query) would have distinct filter value(s).   In workbook settings,  Uncheck "Allow Refresh of Individual Queries".   Also in WB settings, Do Not Refresh at Opening.    For the entire 50-tab workbook, the filter is limited to a minimum:  company code and the date range because the other filters are hardcoded in each tab.    When you refresh and change variable values at opening the file, all you enter is the company code value and the date
    You might also want to change the Grid Properties:  Uncheck Apply Formatting (for performance); and Uncheck Allow Navigation.  You can add these back later.   Might as well uncheck Sort.
    I have my own question about the DPs.  Can you rename them from the generic Data Provider 1 or copy of Data Provider 1?
    Susan McLeod

  • Max number of persons in contact groups - Nokia Lu...

    The max number of persons allowed in a contact group is (as far as I know) restricted to 20 persons. This seems very low and I wonder why this restriction is applied. A limitation of 20 persons in a group is not practical. Any explanation or any idea if this can be changed in the future?

    As you've discovered the maximum number of contacts you can have in a contact group is 20.  If you'd like this limit to be changed to a higher number you really should post a request or add your votes to a similar request on Microsoft's user voice fo....  This is the place that Microsoft created to field user requests for enhanced options for windows phone.
    Microsoft MVP Windows Phone

  • What is Max number of schema in a single DB ?

    Hi All,
    I have small query does anyone have any idea about
    What is Max number of schema in a single DB we can specify in oracle ?
    Thanks n advance.
    Anwar

    You don't say which version of the database you are using. In 10gR2 the maximum limit on users and roles is 2,147,483,638.
    I think this is more users than any sensible DBA would want to manager :)
    Cheers, APC

  • Max number of pages in a spool

    Hi Gurus,
    I have a background job which takes an input file from app server.Input file has 50000 records.I need to process them inside the program and display the result in spool.Now,my question is ,will I be able to see all the records.is there any upper limit for no.of pages that gets generated in the spool.

    Usally no limit for max number of pages ( There may be a system setting for it). But when you scroll down, it does not display all the data. You can either click on the button Settings and choose last 10 pages or click on last page button and that will display till the end.

Maybe you are looking for

  • IPhone 4 and network extender troubles

    I live in an area where I need a network extender to receive a signal.  All has worked perfectly fine in the last 4 years I've been with Verizon, until about 4 weeks ago when my daughter was trying to send me pictures that I never received.  I then n

  • UTF-8 and *.jsp, *.jspf files with NitorX 419

    Hello I hava a problem for setting the encoding of the JSP files in eclipse 3.1rc3 and NitroX 419. I am using tiles (but i am not sure that they are properly recognized). And I want to create one fragment file eg. one for body element in tiles. I am

  • FX 5200 sidebanding addressing?

    The FX 5200 support sidebanding addressing?

  • WHT for MIRO

    Hi all, When am posting a (frieght cost to material) document thro MIRO transaction TDS is not geeting calculated but if i try to post it thro FB60 the system is calculating the TDS. As frieght has to been loaded to Material,i am not having the optio

  • How to create a graph in ADF Faces

    Hi there, I am working with ADF using JDeveloper 10.1.3 with Business Components (BC) and ADF Faces. I am trying to create a graph base on a View object, but I can't see any options on the Data Control Palette. Is there a graph wizard component for A