beego 相比 gin 来讲,感觉在开发 web 上要好用的多,当然这只是个人感觉。
beego 的文档推荐:https://www.kancloud.cn/hello123/beego
但是在 bee run 的时候出现“Failed to watch directory: too many open files” 是不想看到的
可以用 ulimit -a 查看配置
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 256
pipe size (512 bytes, -p) 1
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 709
virtual memory (kbytes, -v) unlimited
文件数为 256,明显少了,于是提高一下
ulimit -S -n 2048
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 2048
pipe size (512 bytes, -p) 1
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 709
virtual memory (kbytes, -v) unlimited
如需转载请注明: 转载自26点的博客
本文链接地址: beego 提示“too many open files” 解决