Solved

Problem with running out of named pipe instances

Posted on 1998-03-04
6
567 Views
Last Modified: 2013-12-23
In the process of running and debugging an application that makes named pipe requests to a named pipe server, I was getting an error indicating that the pipe was busy.  It appears that all of the named pipe instances were in use.  Is there any way to see what is using all of the instances.  Also, is there any way to increase the number of instances that NT allows (i.e. registry value).
0
Comment
Question by:dhoman
  • 4
  • 2
6 Comments
 
LVL 1

Expert Comment

by:kuk010998
ID: 1571247
From Resource Kit Message Reference:
"All pipe instances are busy.
[Kernel32]
The pipe cannot be accessed because another process is using it.
Try the operation again later
"

Sounds like your message. So your app has opened the pipe, and has not closed it. Either you caused this by forgetting close calls, by skipping the close, or by stopping the app. You´d need to end the *process* that holds these opened pipes - possibly with restarting the debugger. Also, think about opening the pipe with different share options.

Some misc stuff:
Registry entries for workstation service described in Q102981 - timeouts for nonblocking requests where there is no data available.
"Limit of 49 Named Pipe Connections from a Single Workstation" = KB Q141709.

Other than Server Manager, I know of no way to " see what is using all of the (pipe) instances" but perhaps the www.ntinternals.com guys have something.

Good luck.

0
 
LVL 1

Expert Comment

by:kuk010998
ID: 1571248
You should *definitely* check http://www.ntinternals.com/nthandlex.htm.
0
 

Author Comment

by:dhoman
ID: 1571249
What determines how many pipes are available.  Does the pipe server controller this.  Does NT control how many pipes are available per process.  If it is controlled by the pipe server, how do you set it progammatically.  If its controlled by NT is there any way to set it via the registry
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 1

Expert Comment

by:kuk010998
ID: 1571250
I do not think there is an inherent limit to the number of pipes per se. The server does limit the number of pipe connections *per client*, that´s what Q141709 says. You can push this limit by setting HKLM\System\ccs\Services\LanmanServer\Parameters\MaxMpxCt REG_DWORD on the pipe server (thought you´d get this out of Q141709 yourself, never hurts to read KB articles in full detail), but the range for this value is only 1 to 100, so you won´t gain too much. As pipes are implemented as pseudo-filesystem (npfs - just like msfs are the mailslots) you should experience more or less the same limits as with open file handles....

Nevertheless, I still think your program should not need more than one instance per pipe, and that you should check your debugging habits, Close calls, and sharing approach...
0
 
LVL 1

Accepted Solution

by:
kuk010998 earned 200 total points
ID: 1571251
I do not think there is an inherent limit to the number of pipes per se. The server does limit the number of pipe connections *per client*, that´s what Q141709 says. You can push this limit by setting HKLM\System\ccs\Services\LanmanServer\Parameters\MaxMpxCt REG_DWORD on the pipe server (thought you´d get this out of Q141709 yourself, never hurts to read KB articles in full detail), but the range for this value is only 1 to 100, so you won´t gain too much. As pipes are implemented as pseudo-filesystem (npfs - just like msfs are the mailslots) you should experience more or less the same limits as with open file handles....

Nevertheless, I still think your program should not need more than one instance per pipe, and that you should check your debugging habits, Close calls, and sharing approach...
0
 

Author Comment

by:dhoman
ID: 1571252
Thanks for the help.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Downtime reduced, data recovered by utilizing an Experts Exchange Business Account Challenge The United States Marine Corps employs more than 200,000 active-duty Marines with operations in four continents, all requiring complex networking system…
Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now