首页 \ 问答 \ python依赖库libcrypto求助

python依赖库libcrypto求助

更新时间:2019-05-05 06:13

最满意答案

你可以在/etc/php5/fpm/pool.d目录下发现这些低效的配置选项。举例来说,以下是我的服务器(当然不是目前这个站点)上的那些低效选项:

; Choose how the process manager will control the number of child processes.
pm = dynamic
pm.max_children = 75
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 20
pm.max_requests = 500
那台服务器是一台DigitalOcean Droplet,配置512M内存。它上面运行了一个新网站,即使完全空闲时,也必须要靠交换内存才能避免僵死。执行top命令显示了服务器上占用内存最多的进程。

PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
13891 cont      20     396944  56596  33416 S  0.0 11.3   :14.05 php5-fpm
13889 cont      20     396480  56316  32916 S  0.0 11.2   :17.67 php5-fpm
13887 cont      20     624212  55088  32008 S  0.0 11.0   :14.02 php5-fpm

其他回答

你可以在/etc/php5/fpm/pool.d目录下发现这些低效的配置选项。举例来说,以下是我的服务器(当然不是目前这个站点)上的那些低效选项:
; Choose how the process manager will control the number of child processes.
pm = dynamic
pm.max_children = 75
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 20
pm.max_requests = 500
那台服务器是一台DigitalOcean Droplet,配置512M内存。它上面运行了一个新网站,即使完全空闲时,也必须要靠交换内存才能避免僵死。执行top命令显示了服务器上占用内存最多的进程。
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13891 cont 20 396944 56596 33416 S 0.0 11.3 :14.05 php5-fpm
13889 cont 20 396480 56316 32916 S 0.0 11.2 :17.67 php5-fpm
13887 cont 20 624212 55088 32008 S 0.0 11.0 :14.02 php5-fpm如果还有不明白的话,你也可以去后盾人看看php基础教学视频看看,也是不错的选择,希望能帮到你,给个采纳吧谢谢(∴◎∀◎∴)
nginx下php-fpm占用内存状态及进程数调整
  网站出现500,查看slowlog日志发现如下提示:
  [html] view plain copy 在code上查看代码片派生到我的代码片
  warning: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 8 idle, and 58 total children
  warning: [pool www] server reached pm.max_children setting (50), consider raising it
  昨天晚上刚改的看来又不够用了!
  查看php-fpm内存占用的几个有用小命令,记录如下:
  1.查看每个fpm的内存占用:
  [vb] view plain copy 在code上查看代码片派生到我的代码片
  ps -ylc php-fpm --sort:rss
  当然,在后后面加 | wc -l可查看系统当前fpm总进程数,我的目前在45个左右。
  php官方的建议设置值:
  pm.max_children = total ram dedicated to the web server / max child process size
  2.查看fpm在你的机子上的平均内存占用:
  [python] view plain copy 在code上查看代码片派生到我的代码片
  ps --no-headers -o "rss,cmd" -c php-fpm | awk '{ sum+=$1 } end { printf ("%d%s\n", sum/nr/1024,"m") }'

相关问答

更多
  • 这个占用多少是根据你php-fpm.conf里面的配置来的。 pm.min_spare_servers = 8 pm.max_spare_servers = 16一般情况是。刚启动的php-fpm占用内存是10M,当过一段时间后会慢慢变成20M左右。 以我这里配置为例,最大情况是16个php-fpm子进程,所有最大大约占用20 * 16 = 320M的内存。
  • 你可以在/etc/php5/fpm/pool.d目录下发现这些低效的配置选项。举例来说,以下是我的服务器(当然不是目前这个站点)上的那些低效选项: ; Choose how the process manager will control the number of child processes. pm = dynamic pm.max_children = 75 pm.start_servers = 10 pm.min_spare_servers = 5 pm.max_spare_servers = 2 ...
  • 我使用php-fpm中的ping.path指令来检查它是否正常工作。 并配置它在nginx.conf(我不知道它是否是你的设置) location /ping { access_log off; allow 127.0.0.1; deny all; root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fa ...
  • 你可以得到SAPI php_sapi_name - 返回Web服务器和PHP之间的接口类型 以小写字符串的形式返回接口类型。 尽管并不详尽,但可能的返回值包括aolserver,apache,apache2filter,apache2handler,caudium,cgi(直到PHP 5.3),cgi-fcgi,cli,continuity,embed,isapi,litespeed,milter,nsapi,phttpd,pi3web,roxen, thttpd,tux和webjames。 对于状态以及提 ...
  • 从配置文件的手册页: 如果存在php-SAPI.ini (其中SAPI是正在使用的SAPI,例如, php-cli.ini或php-apache.ini ),则使用它而不是php.ini 。 可以使用php_sapi_name()确定SAPI名称。 From the manual page for configuration files: If php-SAPI.ini exists (where SAPI is the SAPI in use, so, for example, php-cli.ini o ...
  • 这是一个很好的问题,因为在多数线程或事件驱动的服务应用程序和多进程服务应用程序之间,大多数容器体系结构的覆盖范围都存在一个重要区别。 多线程和事件驱动的服务应用程序可以通过一个进程同时处理多个服务请求。 多进程服务应用程序不是。 Kubernetes工作负载管理机制对于给定服务所面临的真实请求并发级别是完全不可知的,因为不同的并发速率本身不会对自动化工作负载调整或扩展产生任何影响。 但是,潜在的假设是,给定的部署单元 - 一个pod能够同时处理多个请求。 几乎所有部署模型中的PHP都是多进程的。 它需要多个 ...
  • 自php 5.3.9以来,php-fpm中有一个新的设置,'security.limit_extensions',它限制了php-fpm将执行的文件。 默认为'.php',因此不会执行'malicious.jpg'。 There's a new setting in php-fpm since php 5.3.9, 'security.limit_extensions', that limits which files php-fpm will execute. The default is '.php', ...
  • 您可以使用-f标志来跟踪这样的子进程: strace -f $(pidof php-fpm | sed 's/\([0-9]*\)/\-p \1/g') You can use the -f flag to trace child processes like this: strace -f $(pidof php-fpm | sed 's/\([0-9]*\)/\-p \1/g')
  • PHP-FPM是罪魁祸首。 我开始寻找更新,发现我的版本(5.3.3)是PHP-FPM的最后一个独立版本。 随后它被合并到主PHP项目中。 PHP已经在5.5.0上,所以我决定升级到它。 但是,ISPConfig3与5.5.0不兼容,所以我最终升级到5.4.16。 我也设置了pm = ondemand(虽然pm = dynamic可能同样有效)。 现在,我的内存使用量是450MB,低于3.5GB! PHP-FPM is the culprit. I started looking for an update ...
  • 根据php-fpm官方网站: PHP-FPM(FastCGI Process Manager)是一种替代的PHP FastCGI实现,其中一些附加功能对任何大小的站点都有用,尤其是更繁忙的站点。 These features include: 自适应过程产卵(新!) 基本统计数据(ala Apache的mod_status)(新!) 高级流程管理,优雅的停止/启动 能够使用不同的uid / gid / chroot / environment和不同的php.ini启动worker(替换safe_mode) ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)