Hello,
I have a C# tool using the .NET API, and it consistently fails with WSAENOBUFS after a lot of operations. I can't find a way to clean up the resources used for any command except P4Command, which is IDisposable. For the commands I'm using (like Repository.GetChangelist or Client.EditFiles), they seem to use P4Command under the hood but don't clean up after themselves.
I know I can do some work to reduce the number of calls to the server, and I'll attack it from that route, but is there anything I can do short of rewriting my stuff in terms of P4Command to clean up the connections/resources being used?


3 replies to this topic
#1
Posted 30 September 2014 - 07:30 PM
#2
Posted 30 September 2014 - 08:18 PM
Hi,
Sorry to hear you are having connection resource issues. To better trouble-shoot this issue, please let us know the following:
- What version of .NET are you using? (Any of the P4API.NET dll files, if you click on their properties it will show the version. For example in Windows Explorer if you select and right click the file 'p4api.net.dll' and select 'Properties' the 'Details' tab there is info for 'Product Name' and 'Product Version'.)
- What version of Visual Studio are you using (Help->About)?
- Are you using '$p4->Disconnect( );' after you connect and perform whichever actions?
REFERENCES
http://answers.perfo...hreaded-Scripts
http://answers.perfo...imeOutException
http://answers.perfo...-with-P4API-NET
http://answers.perfo...API-NET-Program
Sorry to hear you are having connection resource issues. To better trouble-shoot this issue, please let us know the following:
- What version of .NET are you using? (Any of the P4API.NET dll files, if you click on their properties it will show the version. For example in Windows Explorer if you select and right click the file 'p4api.net.dll' and select 'Properties' the 'Details' tab there is info for 'Product Name' and 'Product Version'.)
- What version of Visual Studio are you using (Help->About)?
- Are you using '$p4->Disconnect( );' after you connect and perform whichever actions?
REFERENCES
http://answers.perfo...hreaded-Scripts
http://answers.perfo...imeOutException
http://answers.perfo...-with-P4API-NET
http://answers.perfo...API-NET-Program
#3
Posted 01 October 2014 - 01:40 PM
p4api.net version: 2014.1.85.4506
Microsoft Visual Studio Premium 2012
Version 11.0.61030.00 Update 4
Microsoft .NET Framework
Version 4.5.50938
No, I'm not calling Disconnect() before the error occurs. Should I be disconnecting and reconnecting between every operation? That might solve my problem but doesn't sound particularly efficient.
Microsoft Visual Studio Premium 2012
Version 11.0.61030.00 Update 4
Microsoft .NET Framework
Version 4.5.50938
No, I'm not calling Disconnect() before the error occurs. Should I be disconnecting and reconnecting between every operation? That might solve my problem but doesn't sound particularly efficient.
#4
Posted 01 October 2014 - 02:04 PM
I don't know that it is necessary to disconnect and reconnect between every operation.
Could you share some source that would show the problem?
How is your connection to the server? Local or Remote?
Could you share some source that would show the problem?
How is your connection to the server? Local or Remote?
Also tagged with one or more of these keywords: .NET, C#, leak
Usage →
APIs →
P4 API for .NET strange issue on DisconnectStarted by mister_wilson, 02 Dec 2019 ![]() |
|
![]() |
||
Usage →
APIs →
P4API.NET for dotnetCore (.NET Core) support?Started by forum1234, 14 Nov 2019 ![]() |
|
![]() |
||
Usage →
APIs →
P4API.NET compatibility in LinuxStarted by Sarath Kumar Harikrishnan, 05 Oct 2019 ![]() |
|
![]() |
||
Usage →
APIs →
P4API.NET How to check if a user/group can access a file on a given host.Started by laurent_tr, 10 Jun 2019 ![]() |
|
![]() |
||
Usage →
APIs →
3ds max integration .netStarted by elpie89, 19 Mar 2019 ![]() |
|
![]() |
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users