Connection Error: A connection attempt failed because the connected party did not properly respond after a period of time

北城以北 提交于 2019-12-04 08:38:10

Well, this is not the flask error, Its basically python socket error

as 10060 seems to be a timeout error, is it possible the server is very slow in accepting and if the website opens in your browser,then there is possibility your browser has higher timeout threshold?

try increasing request time in request.get()

if the remote server is also under your access then : You don't need to bind the socket (unless the remote server has an expectation of incoming socket) - it is extremely rare that this would actually be a requirement to connect.

I think this because steamcommunity's server unstable or some internet problem..

Usually,you can't fix the net shake.But there're still some methods can help u.

First,when you catch the net error,you let your thread sleep one seconds and then try again!

Second,I suggest u use Flask-Cache for this, such as cached 60 seconds,this will help u reduce http request.

In my experience, those "connected party did not responde after a period of time", specially when the same code used to work before, are usually related to MTU sizes. Usually you should just determine the maximum MTU size (don't forget to add 28 bytes as explained in the link) and then you can change the MTU size in your client computer.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!