| |

VerySource

 Forgot password?
 Register
Search
View: 2998|Reply: 26

Each time the Web Service system handle is called, it is increased by 1 and is not recycled when running. Please help me

[Copy link]

2

Threads

23

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

Post time: 2020-3-9 17:30:01
| Show all posts |Read mode
code show as below
UserInterfaceService client = new UserInterfaceService () client.Url = "http: //" + _platformUrl + "/ services / UserInterface";
UserInterface.SimpleUserInfo userInfo = new UserInterface.SimpleUserInfo ();
UserInterface.ClientObject clientInfo = new UserInterface.ClientObject ();
  userInfo.phonenumber = userNumber;
  clientInfo.origin = 6;
int ret = client.isCMPUser (userInfo, clientInfo);
return ret;

UserInterfaceService is a web reference added using .net
Reply

Use magic Report

0

Threads

22

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

Post time: 2020-5-31 23:45:01
| Show all posts
What amount is to be accumulated here? What is the relationship with the handle?
Reply

Use magic Report

2

Threads

23

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

 Author| Post time: 2020-6-1 18:45:01
| Show all posts
client.isCMPUser (userInfo, clientInfo); It is not cumulative, it is just a function function passing parameter, and it has nothing to do with the handle, that is, I did not call the webservice method once, the system handle will increase by one, and no matter how long it waits
Reply

Use magic Report

0

Threads

110

Posts

63.00

Credits

Newbie

Rank: 1

Credits
63.00

 China

Post time: 2020-6-2 13:00:01
| Show all posts
I don't understand this well..

I think it should be the object of UserInterfaceService..

For the problem of handles, the system will manage it by itself. Of course, it is impossible to run out of handles as soon as they are used up.

for reference only..
Reply

Use magic Report

0

Threads

32

Posts

22.00

Credits

Newbie

Rank: 1

Credits
22.00

 China

Post time: 2020-6-2 15:30:01
| Show all posts
Once the webservice is called, no matter how the client called it (for example, when it crashed), it will not affect its continued execution until completion.
Perhaps the phenomenon is caused by the long time of webservice method.
Reply

Use magic Report

0

Threads

22

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

Post time: 2020-6-2 15:45:01
| Show all posts
Misunderstanding...
You can try to call client.Dispose() and observe again, as for the phenomenon of handle increase, it still needs to be verified
Reply

Use magic Report

2

Threads

23

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

 Author| Post time: 2020-6-2 16:15:02
| Show all posts
I did a test. From 9 am, till now, the handle has not been recovered by the runtime. !
Reply

Use magic Report

2

Threads

23

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

 Author| Post time: 2020-6-4 17:45:01
| Show all posts
client.Dispose() I tried it didn't seem to work
Reply

Use magic Report

0

Threads

22

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

Post time: 2020-6-6 09:15:02
| Show all posts
Repeatedly calling ws does cause the number of handles to increase, but it returns to a reasonable level after repeated calls many times. This is to understand the mechanism of gc. If you really need it, you can display the call to gc.collect() (not recommended);
Reply

Use magic Report

2

Threads

23

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

 Author| Post time: 2020-6-6 18:15:01
| Show all posts
TO: qcrabheroExcuse me, how much does the handle grow and no longer grows?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list