| |

VerySource

 Forgot password?
 Register
Search
Author: hitone

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]

0

Threads

22

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

Post time: 2020-6-7 09:45:01
| Show all posts
Most of the test results are between 320-360, simple function webservice, you can try multiple calls to see if it will drop
Reply

Use magic Report

2

Threads

23

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

 Author| Post time: 2020-8-4 11:45:01
| Show all posts
My test here shows that the handle grows consistently, and it will not be automatically collected after waiting for 10 hours. It shows that the handle will not be collected even when calling gc.collect(). Why? My webservice is called in multiple threads. Is it related to multiple threads? Confused, please continue to give some comments
Reply

Use magic Report

0

Threads

22

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

Post time: 2020-8-4 16:15:01
| Show all posts
You can try, in the test environment, a single client calls successively, can it release the handle?
Yes, concurrency control may be added to the code
No, there are unreleased handles in the code? If the file stream is not closed, etc.
Reply

Use magic Report

2

Threads

23

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

 Author| Post time: 2020-8-4 17:30:01
| Show all posts
A single thread will also cause the handle to grow, and there is no file stream access.
Reply

Use magic Report

0

Threads

22

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

Post time: 2020-8-5 12:45:01
| Show all posts
Make a helloworld webservice. The method signature is the same as your webservice. It only returns a string. After using your client for multiple calls, does the handle keep increasing? Can you use gc.collect() to release it? Can the number of handles decrease?
Reply

Use magic Report

2

Threads

23

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

 Author| Post time: 2020-8-5 13:15:01
| Show all posts
TO:crabheroDo you suspect that there is a problem with the server-side WEB service? This should not be because I see that a program of another colleague calls a web service (which is not the same as my call). I don't know. Is it the problem of adding less configuration in the application configuration?
Reply

Use magic Report

2

Threads

23

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

 Author| Post time: 2020-8-5 14:15:02
| Show all posts
What is the truth of the problem?
Reply

Use magic Report

0

Threads

22

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

Post time: 2020-8-5 14:30:01
| Show all posts
Do you suspect that there is a problem with the server-side WEB service?
-----------------------------------
No, it may be that the resources of your client code have not been released. If you call helloworld, the number of client handles cannot be reduced. It may be a problem with your environment. If it can be reduced, it may be a problem with your client code.
Reply

Use magic Report

2

Threads

23

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 United States

 Author| Post time: 2020-8-5 17:30:01
| Show all posts
TO:crabhero:

Use simple helloword to test the same handle growth, and the same on other machines, don’t the test program you write grow?
Service1 client=new Service1();
String str=client.HelloWorld();
if ("Hello World"==str)
{
    return 1;
}
Reply

Use magic Report

0

Threads

22

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

Post time: 2020-8-5 18:30:04
| Show all posts
Don’t the test programs you write grow?
----------------------
It will grow, but it will drop by itself after multiple calls, keep it at a certain number, and use gc.collect() to immediately drop
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