聊聊springboot tomcat的maxHttpFormPostSize
序
本文主要研究一下spring boot tomcat的maxHttpFormPostSize参数
parseParameters
tomcat-embed-core-9.0.37-sources.jar!/org/apache/catalina/connector/Request.java
/*** Parse request parameters.*/protected void parseParameters() {parametersParsed = true;Parameters parameters = coyoteRequest.getParameters();boolean success = false;try {// Set this every time in case limit has been changed via JMXparameters.setLimit(getConnector().getMaxParameterCount());// getCharacterEncoding() may have been overridden to search for// hidden form field containing request encodingCharset charset = getCharset();boolean useBodyEncodingForURI = connector.getUseBodyEncodingForURI();parameters.setCharset(charset);if (useBodyEncodingForURI) {parameters.setQueryStringCharset(charset);}// Note: If !useBodyEncodingForURI, the query string encoding is// that set towards the start of CoyoyeAdapter.service()parameters.handleQueryParameters();if (usingInputStream || usingReader) {success = true;return;}String contentType = getContentType();if (contentType == null) {contentType = "";}int semicolon = contentType.indexOf(';');if (semicolon >= 0) {contentType = contentType.substring(0, semicolon).trim();} else {contentType = contentType.trim();}if ("multipart/form-data".equals(contentType)) {parseParts(false);success = true;return;}if( !getConnector().isParseBodyMethod(getMethod()) ) {success = true;return;}if (!("application/x-www-form-urlencoded".equals(contentType))) {success = true;return;}int len = getContentLength();if (len > 0) {int maxPostSize = connector.getMaxPostSize();if ((maxPostSize >= 0) && (len > maxPostSize)) {Context context = getContext();if (context != null && context.getLogger().isDebugEnabled()) {context.getLogger().debug(sm.getString("coyoteRequest.postTooLarge"));}checkSwallowInput();parameters.setParseFailedReason(FailReason.POST_TOO_LARGE);return;}byte[] formData = null;if (len < CACHED_POST_LEN) {if (postData == null) {postData = new byte[CACHED_POST_LEN];}formData = postData;} else {formData = new byte[len];}try {if (readPostBody(formData, len) != len) {parameters.setParseFailedReason(FailReason.REQUEST_BODY_INCOMPLETE);return;}} catch (IOException e) {// Client disconnectContext context = getContext();if (context != null && context.getLogger().isDebugEnabled()) {context.getLogger().debug(sm.getString("coyoteRequest.parseParameters"), e);}parameters.setParseFailedReason(FailReason.CLIENT_DISCONNECT);return;}parameters.processParameters(formData, 0, len);} else if ("chunked".equalsIgnoreCase(coyoteRequest.getHeader("transfer-encoding"))) {byte[] formData = null;try {formData = readChunkedPostBody();} catch (IllegalStateException ise) {// chunkedPostTooLarge errorparameters.setParseFailedReason(FailReason.POST_TOO_LARGE);Context context = getContext();if (context != null && context.getLogger().isDebugEnabled()) {context.getLogger().debug(sm.getString("coyoteRequest.parseParameters"),ise);}return;} catch (IOException e) {// Client disconnectparameters.setParseFailedReason(FailReason.CLIENT_DISCONNECT);Context context = getContext();if (context != null && context.getLogger().isDebugEnabled()) {context.getLogger().debug(sm.getString("coyoteRequest.parseParameters"), e);}return;}if (formData != null) {parameters.processParameters(formData, 0, formData.length);}}success = true;} finally {if (!success) {parameters.setParseFailedReason(FailReason.UNKNOWN);}}}
tomcat request解析表单参数
maxPostSize
主要是下面这段
if ((maxPostSize >= 0) && (len > maxPostSize)) {Context context = getContext();if (context != null && context.getLogger().isDebugEnabled()) {context.getLogger().debug(sm.getString("coyoteRequest.postTooLarge"));}checkSwallowInput();parameters.setParseFailedReason(FailReason.POST_TOO_LARGE);return;}
如果大于maxPostSize,则会设置FailReason.POST_TOO_LARGE,如果开启debug日志则会打印coyoteRequest.postTooLarge的内容
postTooLarge
coyoteRequest.postTooLarge=Parameters were not parsed because the size of the posted data was too big. Use the maxPostSize attribute of the connector to resolve this if the application should accept large POSTs.
400
对于spring boot来说,请求会报400,也就是参数丢失的错误,比如
org.springframework.web.bind.MissingServletRequestParameterException: Required String parameter 'arg1' is not presentat org.springframework.web.method.annotation.RequestParamMethodArgumentResolver.handleMissingValue(RequestParamMethodArgumentResolver.java:204)at org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.resolveArgument(AbstractNamedValueMethodArgumentResolver.java:114)at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:121)at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:167)at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:134)at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878)at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792)at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)at javax.servlet.http.HttpServlet.service(HttpServlet.java:652)at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:92)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:93)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)at net.rakugakibox.spring.boot.logback.access.tomcat.LogbackAccessTomcatValve.invoke(LogbackAccessTomcatValve.java:91)at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589)at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)at java.base/java.lang.Thread.run(Thread.java:833)
TomcatWebServerFactoryCustomizer
spring-boot-autoconfigure-2.3.3.RELEASE-sources.jar!/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizer.java
public void customize(ConfigurableTomcatWebServerFactory factory) {ServerProperties properties = this.serverProperties;ServerProperties.Tomcat tomcatProperties = properties.getTomcat();PropertyMapper propertyMapper = PropertyMapper.get();propertyMapper.from(tomcatProperties::getBasedir).whenNonNull().to(factory::setBaseDirectory);propertyMapper.from(tomcatProperties::getBackgroundProcessorDelay).whenNonNull().as(Duration::getSeconds).as(Long::intValue).to(factory::setBackgroundProcessorDelay);customizeRemoteIpValve(factory);ServerProperties.Tomcat.Threads threadProperties = tomcatProperties.getThreads();propertyMapper.from(threadProperties::getMax).when(this::isPositive).to((maxThreads) -> customizeMaxThreads(factory, threadProperties.getMax()));propertyMapper.from(threadProperties::getMinSpare).when(this::isPositive).to((minSpareThreads) -> customizeMinThreads(factory, minSpareThreads));propertyMapper.from(this.serverProperties.getMaxHttpHeaderSize()).whenNonNull().asInt(DataSize::toBytes).when(this::isPositive).to((maxHttpHeaderSize) -> customizeMaxHttpHeaderSize(factory, maxHttpHeaderSize));propertyMapper.from(tomcatProperties::getMaxSwallowSize).whenNonNull().asInt(DataSize::toBytes).to((maxSwallowSize) -> customizeMaxSwallowSize(factory, maxSwallowSize));propertyMapper.from(tomcatProperties::getMaxHttpFormPostSize).asInt(DataSize::toBytes).when((maxHttpFormPostSize) -> maxHttpFormPostSize != 0).to((maxHttpFormPostSize) -> customizeMaxHttpFormPostSize(factory, maxHttpFormPostSize));propertyMapper.from(tomcatProperties::getAccesslog).when(ServerProperties.Tomcat.Accesslog::isEnabled).to((enabled) -> customizeAccessLog(factory));propertyMapper.from(tomcatProperties::getUriEncoding).whenNonNull().to(factory::setUriEncoding);propertyMapper.from(tomcatProperties::getConnectionTimeout).whenNonNull().to((connectionTimeout) -> customizeConnectionTimeout(factory, connectionTimeout));propertyMapper.from(tomcatProperties::getMaxConnections).when(this::isPositive).to((maxConnections) -> customizeMaxConnections(factory, maxConnections));propertyMapper.from(tomcatProperties::getAcceptCount).when(this::isPositive).to((acceptCount) -> customizeAcceptCount(factory, acceptCount));propertyMapper.from(tomcatProperties::getProcessorCache).to((processorCache) -> customizeProcessorCache(factory, processorCache));propertyMapper.from(tomcatProperties::getRelaxedPathChars).as(this::joinCharacters).whenHasText().to((relaxedChars) -> customizeRelaxedPathChars(factory, relaxedChars));propertyMapper.from(tomcatProperties::getRelaxedQueryChars).as(this::joinCharacters).whenHasText().to((relaxedChars) -> customizeRelaxedQueryChars(factory, relaxedChars));customizeStaticResources(factory);customizeErrorReportValve(properties.getError(), factory);}
customizeMaxHttpFormPostSize
private void customizeMaxHttpFormPostSize(ConfigurableTomcatWebServerFactory factory, int maxHttpFormPostSize) {factory.addConnectorCustomizers((connector) -> connector.setMaxPostSize(maxHttpFormPostSize));}
tomcat-embed-core-9.0.37-sources.jar!/org/apache/catalina/connector/Connector.java
/*** Set the maximum size of a POST which will be automatically* parsed by the container.** @param maxPostSize The new maximum size in bytes of a POST which will* be automatically parsed by the container*/public void setMaxPostSize(int maxPostSize) {this.maxPostSize = maxPostSize;setProperty("maxPostSize", String.valueOf(maxPostSize));}
The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The limit can be disabled by setting this attribute to a value less than zero. If not specified, this attribute is set to 2097152 (2 megabytes). Note that the FailedRequestFilter can be used to reject requests that exceed this limit.
customizeMaxSwallowSize
private void customizeMaxSwallowSize(ConfigurableTomcatWebServerFactory factory, int maxSwallowSize) {factory.addConnectorCustomizers((connector) -> {ProtocolHandler handler = connector.getProtocolHandler();if (handler instanceof AbstractHttp11Protocol) {AbstractHttp11Protocol<?> protocol = (AbstractHttp11Protocol<?>) handler;protocol.setMaxSwallowSize(maxSwallowSize);}});}
tomcat-embed-core-9.0.37-sources.jar!/org/apache/coyote/http11/AbstractHttp11Protocol.java
/*** Maximum amount of request body to swallow.*/private int maxSwallowSize = 2 * 1024 * 1024;public int getMaxSwallowSize() { return maxSwallowSize; }public void setMaxSwallowSize(int maxSwallowSize) {this.maxSwallowSize = maxSwallowSize;}
The maximum number of request body bytes (excluding transfer encoding overhead) that will be swallowed by Tomcat for an aborted upload. An aborted upload is when Tomcat knows that the request body is going to be ignored but the client still sends it. If Tomcat does not swallow the body the client is unlikely to see the response. If not specified the default of 2097152 (2 megabytes) will be used. A value of less than zero indicates that no limit should be enforced.
小结
tomcat提供了maxPostSize及maxSwallowSize两个参数,其中maxPostSize用于限制post表单请求大小,默认2M,而maxSwallowSize用于限制aborted upload能够swallowed的大小。在springboot的2.3.3版本的话,通过server.tomcat.max-http-form-post-size
来指定maxPostSize大小。
doc
- tomcat config http
相关文章:
聊聊springboot tomcat的maxHttpFormPostSize
序 本文主要研究一下spring boot tomcat的maxHttpFormPostSize参数 parseParameters tomcat-embed-core-9.0.37-sources.jar!/org/apache/catalina/connector/Request.java /*** Parse request parameters.*/protected void parseParameters() {parametersParsed true;Para…...

java并发:synchronized锁详解
背景: 在java多线程当中,我们总有遇到过多个线程操作一个共享数据时,而这个最后的代码执行结果并没有按照我们的预期一样得到正确的结果。此时我们就需要让代码执行在操作共享变量时,要等一个线程操作完毕时,另一个线程…...

Unity 之NavMeshAgent 组件(导航和路径寻找的组件)
文章目录 **作用**:**属性和方法**:**用途**:**注意事项**: NavMeshAgent 是Unity引擎中用于导航和路径寻找的组件。它可以使游戏对象在场景中自动找到可行走的路径,并在避免障碍物的情况下移动到目标位置。 以下是关于…...

装箱和拆箱
1. 概念 装箱 将值类型转换成等价的引用类型 装箱的步骤 拆箱 将一个已装箱的引用类型转换为值类型,拆箱操作需要声明拆箱后转换的类型 拆箱的步骤 1)获取已装箱的对象的地址 2)将值从堆上的对象中复制到堆栈上的值变量中 2. 总结 装箱和拆箱…...
等保测评--安全通信网络--测评方法
安全子类--安全架构 a)应保证网络设备的业务处理能力满足业务高峰期需要; 一、测评对象 路由器、交换机、无线接入设备和防火墙等提供网络通信功能的设备或相关组件 二、测评实施 1) 应核查业务高峰时期一段时间内主要网络设备(一般包括核心交换机、汇聚交换机、边界路…...
统计学补充概念11-tsne
概念 t-SNE(t-distributed Stochastic Neighbor Embedding)是一种非线性降维技术,用于可视化高维数据在低维空间中的分布。与主成分分析(PCA)等线性降维方法不同,t-SNE专注于保留数据点之间的局部相似性关…...

Linux_11_系统启动和内核管理
目录 1 C entOS 6 的启动管理1.1 Linux 组成1.2 内核设计流派1.3 CentOS 6启动流程1.3.1 CentOs 6 启动流程1.3.1 硬件启动POST1.3.2 bootloader 启动/引导加载器1.3.2.1 grub 功能和组成1.3.2.2 CentOS 6 grub 安装1.3.2.3 grub legacy 管理 1.3.3 加载 kernel1.3.4 init 初始…...
【从零学习python 】65. Python正则表达式修饰符及其应用详解
文章目录 正则表达式修饰符进阶案例 正则表达式修饰符 修饰符描述re.I使匹配对大小写不敏感re.M多行匹配,影响 ^ 和 $re.S使 . 匹配包括换行在内的所有字符 示例代码如下: import reprint(re.search(rL, hello)) # None# 不区分大小写,可…...

QA2
1. import shutil 是什么意思? 在 Python 中,import shutil 是导入标准库 shutil 的语句。shutil 提供了一些用于复制文件和文件夹、移动文件和文件夹、以及执行其他文件操作的函数。 通过导入 shutil,你可以使用其中的函数来处理文件和文件…...
centos7卸载docker
要在CentOS 7上干净地卸载Docker,可以执行以下步骤: 停止Docker服务: sudo systemctl stop docker移除所有Docker容器和镜像。这将删除所有相关数据,包括容器、镜像以及存储卷等。请注意,这将不可逆转地删除数据。 …...

【计算机视觉】递归神经网络在图像超分的应用Deep Recursive Residual Network for Image Super Resolution
DRCN: Deeply-Recursive Convolutional Network for Image Super-Resolution 总结 这篇文章是第一次将之前已有的递归神经网络(Recursive Neural Network)结构应用在图像超分辨率上。为了增加网络的感受野,提高网络性能,引入了深度递归神经网络&#x…...

Centos 7 安装系列(8):openGauss 3.0.0
安装依赖包: yum -y install libaio-devel flex bison ncurses-devel glibc-devel patch redhat-lsb-core readline-devel openssl-devel sqlite-devel libnsl 安装插件: yum install -y bzip2 net-tools为什么要安装这两个? 安装bzip2 是…...
NOIP真题讲解 传球游戏 接水问题
传球游戏 说明 上体育课的时候,小蛮的老师经常带着同学们一起做游戏。这次,老师带着同学们一起做传球游戏。 游戏规则是这样的:n个同学站成一个圆圈,其中的一个同学手里拿着一个球,当老师吹哨子时开始传球,…...

《论文阅读18》 SSD: Single Shot MultiBox Detector
一、论文 研究领域: 2D目标检测论文:SSD: Single Shot MultiBox Detector ECCV 2016 数据集 论文链接论文github 二、论文概要 SSD网络是作者Wei Liu在ECCV 2016上发表的论文。对于输入尺寸300x300的网络 使用Nvidia Titan X在VOC 2007测试集上达到74…...
NOIP2016普及组第四题 魔法阵
魔法阵 题目描述 六十年一次的魔法战争就要开始了,大魔法师准备从附近的魔法场中汲取魔法能量。 大魔法师有m个魔法物品,编号分别为1,2,…,m。每个物品具有一个魔法值,我们用Xi表示编号为i的物品的魔法值。每个魔法值Xi是不超过n的正整数&…...

uniapp-滑块验证组件wo-slider
wo-slider是一款支持高度自定义的滑块验证组件,采用uniapp-vue2编写 采用touchstart、touchmove、touchend事件实现的滑块组件,支持H5、微信小程序(其他小程序未试过,可自行尝试) 可到插件市场下载尝试: https://ext.…...

NPM 管理组织成员
目录 1、向组织添加成员 1.1 邀请成员加入您的组织 1.2 撤销组织邀请 2、接收或拒接组织邀请 2.1 接收组织邀请 2.2 拒绝组织邀请 3、组织角色和权限 4、管理组织权限 5、从组织中删除成员 1、向组织添加成员 作为组织所有者,您可以将其他npm用户添加到…...
设计模式(3)抽象工厂模式
一、概述: 1、提供一个创建一系列相关或相互依赖对象的接口,而无须指定它们具体的类。 2、结构图: 3、举例代码: (1) 实体: public interface IUser {public void insert(User user);public…...

【C++】早绑定、析构与多态 | 一道关于多态的选择题记录
今天在和群友聊天的时候看到了一道很坑的题目,分享给大家 1.看题! 先来看看题目 struct Dad { public:Dad(){ echo();}~Dad(){ echo();}virtual void echo() {cout << "DAD ";} };struct Son:Dad { public:void echo() const override…...
mac下安装tomcat
1. 官网下载Apache Tomcat - Apache Tomcat 9 Software Downloads 2. 授权bin目录下所有.sh文件权限sudo chmod 755 *.sh 3. 启动程序(后台运行) sudo sh ./startup.sh 4. 在当前窗口启动程序,随时看到日志sudo sh ./catalina.sh run 5. 关闭程序 sudo sh ./shu…...

Springcloud:Eureka 高可用集群搭建实战(服务注册与发现的底层原理与避坑指南)
引言:为什么 Eureka 依然是存量系统的核心? 尽管 Nacos 等新注册中心崛起,但金融、电力等保守行业仍有大量系统运行在 Eureka 上。理解其高可用设计与自我保护机制,是保障分布式系统稳定的必修课。本文将手把手带你搭建生产级 Eur…...
什么是EULA和DPA
文章目录 EULA(End User License Agreement)DPA(Data Protection Agreement)一、定义与背景二、核心内容三、法律效力与责任四、实际应用与意义 EULA(End User License Agreement) 定义: EULA即…...

深入解析C++中的extern关键字:跨文件共享变量与函数的终极指南
🚀 C extern 关键字深度解析:跨文件编程的终极指南 📅 更新时间:2025年6月5日 🏷️ 标签:C | extern关键字 | 多文件编程 | 链接与声明 | 现代C 文章目录 前言🔥一、extern 是什么?&…...

[大语言模型]在个人电脑上部署ollama 并进行管理,最后配置AI程序开发助手.
ollama官网: 下载 https://ollama.com/ 安装 查看可以使用的模型 https://ollama.com/search 例如 https://ollama.com/library/deepseek-r1/tags # deepseek-r1:7bollama pull deepseek-r1:7b改token数量为409622 16384 ollama命令说明 ollama serve #:…...
Kafka主题运维全指南:从基础配置到故障处理
#作者:张桐瑞 文章目录 主题日常管理1. 修改主题分区。2. 修改主题级别参数。3. 变更副本数。4. 修改主题限速。5.主题分区迁移。6. 常见主题错误处理常见错误1:主题删除失败。常见错误2:__consumer_offsets占用太多的磁盘。 主题日常管理 …...

通过MicroSip配置自己的freeswitch服务器进行调试记录
之前用docker安装的freeswitch的,启动是正常的, 但用下面的Microsip连接不上 主要原因有可能一下几个 1、通过下面命令可以看 [rootlocalhost default]# docker exec -it freeswitch fs_cli -x "sofia status profile internal"Name …...
DiscuzX3.5发帖json api
参考文章:PHP实现独立Discuz站外发帖(直连操作数据库)_discuz 发帖api-CSDN博客 简单改造了一下,适配我自己的需求 有一个站点存在多个采集站,我想通过主站拿标题,采集站拿内容 使用到的sql如下 CREATE TABLE pre_forum_post_…...
初级程序员入门指南
初级程序员入门指南 在数字化浪潮中,编程已然成为极具价值的技能。对于渴望踏入程序员行列的新手而言,明晰入门路径与必备知识是开启征程的关键。本文将为初级程序员提供全面的入门指引。 一、明确学习方向 (一)编程语言抉择 编…...
【系统架构设计师-2025上半年真题】综合知识-参考答案及部分详解(回忆版)
更多内容请见: 备考系统架构设计师-专栏介绍和目录 文章目录 【第1题】【第2题】【第3题】【第4题】【第5题】【第6题】【第7题】【第8题】【第9题】【第10题】【第11题】【第12题】【第13题】【第14题】【第15题】【第16题】【第17题】【第18题】【第19题】【第20~21题】【第…...

docker容器互联
1.docker可以通过网路访问 2.docker允许映射容器内应用的服务端口到本地宿主主机 3.互联机制实现多个容器间通过容器名来快速访问 一 、端口映射实现容器访问 1.从外部访问容器应用 我们先把之前的删掉吧(如果不删的话,容器就提不起来,因…...