You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

SVN提交报错Too many open files,修改ulimit仍无效如何解决?

SVN提交报错Too many open files解决方法

问题描述

临时将系统ulimit打开文件数从默认1024调整为65535后,SVN提交仍然失败,抛出如下报错:
svn: Can't open file '/svn/**/db/transactions/59811-1a73.txn/changes': Too many open files
操作日志如下:

root@debian:/# ulimit -n
1024
root@debian:/# ulimit -n 65535
root@debian:/# ulimit -n
65535

root@debian:/# svn ci -m 'ck'
Sending        **.txt
Transmitting file data ....svn: Commit failed (details follow):
svn: Can't open file '/svn/**/db/transactions/59811-1a73.txn/changes': Too many open files

root@debian:/svn/**/db/transactions# ls -trl
total 236
drwxr-sr-x 2 root root 4096 Sep  6 16:45 59810-1a5i.txn
...
drwxr-sr-x 2 root root 4096 Sep  6 20:49 59811-1a73.txn
drwxr-sr-x 2 root root 4096 Sep  6 20:50 59811-1a74.txn

根因说明

ulimit -n 65535为当前终端会话的临时生效配置,仅对当前会话内启动的进程生效,SVN运行进程的资源限制不会随该临时配置变更,且重启终端后配置会失效。

解决步骤

  • 修改/etc/security/limits.conf配置文件,永久设置全局打开文件数限制:
sudo vim /etc/security/limits.conf

# 在文件末尾追加如下配置
* soft     nproc          65535    
* hard     nproc          65535   
* soft     nofile         65535   
* hard     nofile         65535
root soft     nproc          65535    
root hard     nproc          65535   
root soft     nofile         65535   
root hard     nofile         65535
  • 重新连接终端,执行ulimit -n验证配置是否生效,预期返回值为65535
  • 重启SVN服务进程,让新的资源限制对SVN生效即可

内容的提问来源于stack exchange,提问作者Victor Lee

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.05 16:15:03