Comments (5)
movie超时的主要原因是豆瓣电影的图片做了防盗链的策略, 不能直接在slack里面显示, 所以我的做法是,下载图片, 把它传到slack的文件服务器上, 然后获得返回的url. 大部分的时间都浪费在下载和上传图片的时候.
我当时研究过改这个超时, 但是没有找到对应的设置方式
from slack_bot.
@firemiles @dongweiming 如果是heroku那边的超时,参考 https://devcenter.heroku.com/articles/request-timeout 这里有说明可以设置超时时间
或者在flask-slackbot这层,加一个handle超时处理的支持
from slack_bot.
@halfcrazy 你说的这个页面没有对我们这种环境的配置
from slack_bot.
@dongweiming PROC文件web: gunicorn wsgi:app --timeout 240 --log-file -
这里的--timeout 240
,在heroku上是没用的,最大是30s,也就是默认的timeout。
By default, Gunicorn gracefully restarts a worker if hasn’t completed any work within the last 30 seconds.
from slack_bot.
我后来给heroku的帮助中心发了邮件, 问怎么修改. 它们给的回复是没法修改, 我们只能自己优化解决.
Hi,
30s timeout is Heroku router level timeout, so you can't use anything longer even though it's technically >configurable with Gunicorn (and I think your Gunicorn is actually using your timeout, but the response >just doesn't reach to the client because Heroku router already made a response with H12 errors). You'll >see H12 errors for any requests that take more than 30s as Steven explained, it's a hard limit of Heroku >platform and we can't extend this, unfortunately.
If you expect the request to be more than 30s, you'll need to optimize it or find some workaround.
Best,
Keiko
from slack_bot.
Related Issues (5)
- bj_bus.py 39,57行 HOT 12
- use current_app to get app? HOT 1
- 能在setting文件里加上注释吗 HOT 4
- Plugin用ABC重构,做一个抽象基类
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slack_bot.