linux bin su,linux – su:/ bin / bash:资源暂时不可用
無法將用戶切換為postgres.
postgres用戶的ulimit設置設置了合理的限制.我們沒有達到最高限度.
/ var / log / messages中沒有錯誤.
BETA -bash-4.2# sudo su - postgres
su: /bin/bash: Resource temporarily unavailable
設置:
BETA -bash-4.2# ps -auxww | grep -i postgr | wc -l
503
BETA -bash-4.2# lsof | grep -i postgr | wc -l
35225
BETA -bash-4.2#
適用于postgres流程的Ulimit.
BETA -bash-4.2# cat /proc/26230/limits
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 256580 256580 processes
Max open files 1024 4096 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 256580 256580 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
用netstat
BETA -bash-4.2# netstat -plan | grep -i post | grep ESTABLISHED | wc -l
496
BETA -bash-4.2#
Ulimit設置
BETA -bash-4.2# cat /etc/security/limits.d/postgres_limits.conf
# Limits settings for postgres
postgres soft nofile 4096
postgres hard nofile 4096
postgres soft nproc 400
postgres hard nproc 400
在我重新開始postgres之后,我能夠進入.
postgres用戶的資源工具.
BETA -bash-4.2# netstat -plan | grep -i post | grep ESTABLISHED | wc -l
1
BETA -bash-4.2#
BETA -bash-4.2# lsof | grep -i postgr | wc -l
309
BETA -bash-4.2# ps -auxww | grep -i postgr | wc -l
8
BETA -bash-4.2#
總結
以上是生活随笔為你收集整理的linux bin su,linux – su:/ bin / bash:资源暂时不可用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: kenftpgw.exe是什么进程 有什
- 下一篇: c语言程序设计现代方法快速排序,C语言实