• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Open Transport cannot allocate enough system resources
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open Transport cannot allocate enough system resources


  • Subject: Re: Open Transport cannot allocate enough system resources
  • From: Andrew Bush <email@hidden>
  • Date: Thu, 31 Oct 2002 19:58:41 +1300

Hi all,

thanks to Quinn for his help here, this side is now working nicely.

<g> now for problem two..

I am attempting to reuse the endpoints after they are created, to do this I create an endpoint, use it for a connection, then I close the connection and store the endpoint for 2 minutes before attempting to reuse it,

When the time comes to reuse it I check the endpoint state using OTGetEndpointState and if this returns 1 (unbound) I reset the address and attempt to rebind & connect.

..the good news is that this appears to be working perfectly :)

Where I have a problem though is if I watch the cpu usage of the application in top, for the first two minutes it ticks along nicely, and then as soon as I begin reusing stored sockets the cpu usage appears to jump outrageously and from that point on hovers fairly consistently between 98% and 122% as reported by top in mac os 10.2

OTOH if I create a new endpoint for every connection, and discard each endpoint as soon as that connection is complete, this does not happen at all....the application ticks along at around 8-10% quite nicely for the next 2 hours or so, and after that begins to increase slowly but surely.

so Im keen to stick to reusing the endpoints if its at all possible, does anyone know of a possible explanation for the sudden jump in cpu usage when I begin reusing the endpoints? they still actually work correctly, everything appears to be progressing as normal...except for this surge...


thanks for any help.


Yours cheerfully,


Andrew Bush



On Tuesday, October 29, 2002, at 02:00 AM, Andrew Bush wrote:

Hi all,


Im writing an application that uses open transport in 10.1.5 and 10.2, it uses a large number of outgoing connections and is almost continuously creating or reusing endpoints.

After about 15 minutes of reusing endpoints I begin to get this error:

kENOSRErr -3271 Open Transport cannot allocate enough system resources (usually stream messages) to meet your request.

<g> is there a way around it? is there any reason that reusing endpoints is problematic in osx?

I am maintaining a pool of around 3-4 hundred endpoints at any 1 time, and allowing each endpoint to sit for around 2 minutes after its previous usage, I then check that its in an unbound state and attempt to reuse it.

Interestingly enough if I create a new endpoint for every connection attempt this appears to work somewhat better and doesn't have any problems for a good hour or two...although the cpu usage is a little higher.

any advice would be appreciated, Ive been hitting my head against a wall now for a while, ive gone through various tech notes (living in a dynamic environment etc) and as far as I can tell im doing things correctly.

Another thing that happens is that doing a lsof call from the terminal reveals a large number of tcp cantsend cantrcv type errors, I assume this is an equivalent error?
<g> again, this doesn't seem ot be happening if I recreate the endpoints anew everytime....

Id love to be able to reuse the endpoints, as this feels like it should be the 'correct' way to handle so many outgoing connections....

Thanks in advance for any help.


Yours cheerfully,


Andrew Bush


The word for a society where everyone is pulling together is 'Tyranny', in a free country everyone tends to pull in different directions.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.


A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure,
program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Open Transport cannot allocate enough system resources
      • From: Quinn <email@hidden>
References: 
 >Open Transport cannot allocate enough system resources (From: Andrew Bush <email@hidden>)

  • Prev by Date: Re: MacOS-X PPP Status dialogs
  • Next by Date: Re: Open Transport cannot allocate enough system resources
  • Previous by thread: Re: Open Transport cannot allocate enough system resources
  • Next by thread: Re: Open Transport cannot allocate enough system resources
  • Index(es):
    • Date
    • Thread