CloseableHttpClient stuck Problem

Disposition:

1. socket timeout setting response

SocketConfig socketConfig = SocketConfig.custom()
                .setSoKeepAlive(false)
                .setSoReuseAddress(true)
                .setSoTimeout(70000)
                .setTcpNoDelay(true).build();

2. Turn off the flow of resources in response

res.getEntity().getContent().close();

 

Intelligent Recommendation

connection.getOutputStream () stuck running problem

Solution is Add the following code...

Requests stuck problem

After writing a multi-threaded wallpaper crawling program before, I found that sometimes when running, there will be a thread stuck when opening a link to a picture (it seems that it is usually when t...

Solve the idea stuck problem

Premise: idea carton has many problems, the key is to be determined. 1. Insufficient memory: There are a lot of memory configuration optimizations on the Internet, so I won’t say it. Say a littl...

Tomcat startup stuck problem

Today at work, I found that the packaging project war package (mvn package command execution packaging) was deployed to tomcat7. When it was started, it was directly stuck and there was no error messa...

Mycat1.5 stuck problem

First, Mycat executes sql stuck Execute sql statement and data_type ='xxx' ORDER BY created_time desc x Executing this kind of sql causes Reactor thread to be stuck and cpu is full Two, Mycat process ...

More Recommendation

Android studio stuck problem

Use Android studio version is 2.3.3 Recently, when I was using Android studio, I encountered an incident. Android studio was very smooth and smooth from the beginning of the project to the middle of t...

Solve the problem of PhpStorm stuck

1. Open the /phpstorm/bin/phpstorm.exe.vmoptions file and add 2. Save and exit, restart phpstorm...

Task.Result stuck problem

In the following code: Called in the UI thread At this time the thread will be stuck; Two solutions: 1. Use async and await in all calling method chains. 2, Remove the async and await in the call chai...

Idea stuck problem solve

1. Open Intellij IDEA slowly, want to improve the startup speed) Open D: \ Jetbrains \ Intellij IDEA 2020.3.2 \ bin (according to the actual installation path) direct file Idea64.exe.vmoptions or Idea...

Idea stuck problem processing

0, problem description Idea is stuck when writing code and typing. The IDEA menu bar also stuck in the circle. It takes about 30 seconds to 1 minute to recover, and the stuck frequency is very high. T...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top