Comments (8)
pymongo MongoClient是自身就有连接池的,默认就是100.(每个进程会生成各自的mongo连接池)
- `maxPoolSize` (optional): The maximum allowable number of
concurrent connections to each connected server. Requests to a
server will block if there are `maxPoolSize` outstanding
connections to the requested server. Defaults to 100. Can be
either 0 or None, in which case there is no limit on the number
of concurrent connections.
- `minPoolSize` (optional): The minimum required number of concurrent
connections that the pool will maintain to each connected server.
Default is 0.
- `maxIdleTimeMS` (optional): The maximum number of milliseconds that
a connection can remain idle in the pool before being removed and
replaced. Defaults to `None` (no limit).
进程也是可以设置自动重启的,不依赖亲自手动重启。
from funboost.
你使用mongo做消息队列还是存储消费状态,目前。可以发下你的boost装饰器看看,然后发一下启动函数消费的代码截图看看
from funboost.
建议使用猴子补丁来替换funboost的mongo类就好了。 这种关于最中间件连接池配置的不暴露在funboost_config.py 中,用户想修改,使用猴子补丁方式动态替换连接到自己的类即可。
from funboost.
是用来存储消费状态的,那我试下用猴子补丁来替换试试,感谢作者
from funboost.
建议先升级到19.7,再打猴子补丁,19.7 mongo 做了一次变化。
from funboost.
你的类 (Your定义的MongoMixin) 实例化pymongo你写成 pymongo.MongoClient(funboost_config_deafult.MONGO_CONNECT_URL,
connect=False,maxIdleTimeMS=60*1000,minPoolSize=3,maxPoolSize=20)
from funboost.utils import mongo_util
mongo_util.MongoMixin = Your定义的MongoMixin
from funboost.
好的好的😊
from funboost.
进程设置自动重启这个是在哪里配置的,我看了文档也没有相关参数配置
from funboost.
Related Issues (20)
- 远程的问题 HOT 9
- 建议:项目工程可以搞的正式一点,readme和文档默认成英语,这样能更好的推广到全球 HOT 3
- sqlite作为中间件例子在mac/linux运行,报错 read-only [用户文件夹权限问题,自己修改个文件夹] HOT 4
- 如何快捷的停止multi_process_consume 这个消费函数的所有进程 HOT 3
- base_publisher的publish函数好像有点问题[用户没了解python字典是可变对象] HOT 8
- 发现一个有趣的问题 HOT 3
- 如果两个booster嵌套使用的话,多进程好像运行会阻塞? HOT 21
- delay
- delay 任务支持retry的时候设置countdown吗? HOT 3
- django的模块引入和启动 HOT 16
- pip包太厚重了, 能不能搞精简一点的, 比如我就只需要redis跟异步就可以了, 其他的完全不需要 HOT 10
- 接受非booster传过来的消息,没有extra, 导致consume 失败 HOT 1
- result_web. index.html 中 其中的一个css文件无法下载了 “bootstrap.min.css” HOT 1
- 姑且提醒下这个repo错别字连篇
- [BUG]ModuleNotFoundError: No module named 'db_libs' [contrib里面是作者额外贡献的功能,需要用户自己安装相关三方包] HOT 3
- 请教: 如何使用 nb_log 打印task_id HOT 19
- BUG: AttributeError("'_thread._local' object has no attribute 'function_result_status'" HOT 7
- 【bug】可能存在的bug- 在线急等修复(我就不用再加猴子补丁了~~)[用户自己写法错误问题] HOT 8
- windows上的脚本到linux上远程执行时的路径不正确 HOT 9
- 你好,我想请教一下使用Rocketmq作为中间件时自定义消费者类的问题 HOT 7
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 funboost.