`

C/CPP的fastcgi程序-memleak

阅读更多

原生的用lighttpd起的程序不好检查memory leak.

使用spawn-fcgi调起用valgrind起的fastcgi程序即可.

spawn-fcgi -n -a 127.0.0.1 -p 9000 -- /usr/bin/valgrind --leak-check=full --log-file=/tmp/valgrind.log /path/to/prog

spawn-fcgi -n -a 127.0.0.1 -p 9000 -- /usr/bin/valgrind -v --tool=callgrind --log-file=/tmp/valgrind /path/to/prog

调试的话,直接gdb attach上进程ID即可.

分享到:
评论

相关推荐

    Nginx RPM 包定制制作

    /application/nginx-1.6.3/conf/fastcgi_params.default /application/nginx-1.6.3/conf/koi-utf /application/nginx-1.6.3/conf/koi-win /application/nginx-1.6.3/conf/mime.types /application/nginx-1.6.3/conf/...

    mod_fastcgi-2.4.6.tar.gz

    [原创] Redhat 上 FastCGI 安装与配置 软件包 相关软件包: httpd httpd-devel fcgi-2.4.0.tar.gz mod_fastcgi-2.4.6.tar.gz 请仔细阅读其中的README 配置httpd.conf: LoadModule fastcgi_module modules/mod_...

    nginx connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporarily unavailable)

    标题中的“nginx connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporarily unavailable)”是一个常见的错误信息,这通常发生在Nginx尝试与PHP-FPM(FastCGI进程管理器)通信时,但遇到了资源暂时...

    nginx-1.15.5-win64-vs2017-v141-sdk10.0.17134.12

    nginx的64位版本。 编译参数: auto/configure --with-cc=cl --builddir=objs --prefix= --conf-path=conf/nginx.conf --error-log-path=logs/nginx_error.log --......

    邓州论坛FastCGI博客系统 v2.0.rar

    1. 引入了 配置文件 2. 增加cookie 解析,和文件上传功能 ... 4. 支持代码高亮 5. 使用了内存池.统一分配 统一释放,程序更安全 ...6. 更清晰的 程序目录分类. ...(1) db 为 数据库目录(2) log...c-blog2.0 依赖这些 第三方库

    Nginx源码编译安装.md

    --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi \ --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi \ --http-scgi-temp-path=/var/lib/nginx/tmp/scgi \ --pid-path=/run/nginx.pid \ --lock-path=/...

    nginx-Win32.zip

    需要用到with-stream和with-stream_realip_module,自己编译了一个 -----------------------------版本信息----------------------------------------- nginx version: nginx/1.21.1 built by cl ......

    CentOS 6.1 环境中部署nginx、php(包括fastcgi)、虚拟主机配置

    ### CentOS 6.1 环境中部署nginx、php(包括fastcgi)及虚拟主机配置 #### 一、背景介绍 在CentOS 6.1环境下部署Nginx、PHP(包括FastCGI)以及配置虚拟主机是常见的Web服务器搭建步骤。这种组合非常适合构建高效...

    /etc/php-fpm.d/www.conf 配置注意事项

    在运维和管理PHP-FPM(PHP FastCGI Process Manager)时,配置文件`/etc/php-fpm.d/www.conf`起着至关重要的作用。这个配置文件是PHP-FPM工作池(pool)的配置,用于控制PHP处理请求的方式。下面将详细讨论配置注意...

    邓州论坛FastCGI博客系统 2.0.rar

    邓州论坛FastCGI博客系统 2.0 版本更新说明: c-blog2.0 依赖这些 第三方库 后台功能 1. 分类管理、添加、删除、编辑(只支持一级分类) 2. 文章管理、添加、删除、编辑 3. 生成静态首页、清除全部静态页缓存 ...

    php 安装配置文件

    这里开启了PHP-FPM(FastCGI Process Manager)功能,同时增加了`--with-imagick`选项来支持ImageMagick图形处理库,这对于需要进行复杂图像处理的应用来说是非常有用的。 以上就是关于PHP安装配置的主要内容,通过...

    php7.3.33.tar.gz 源码安装包

    PHP-FPM是PHP FastCGI进程管理器,用于处理来自Web服务器的请求。你需要编辑`/etc/php/php-fpm.conf`(或相应配置文件)以配置PHP-FPM。根据需要设置监听端口、用户和组等参数。 ### 六、配置Web服务器 如果你使用...

    nginx配置指南

    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } ``` 2. 创建PHP-FPM启动脚本并启动服务: ```bash cp /usr/local/webserver/...

    php-5.6.29.tar.gz

    编译 ./configure --prefix=/usr/local/...curl --with-jpeg-dir --with-freetype-dir --enable-opcache --enable-fpm --enable-fastcgi --with-fpm-user=...

    nginx-sticky-module-1.25.zip

    nginx sticky是nginx的module,可以实现基于cookie的负载均衡。 下载后,在编译安装nginx时,用--add-module... ./configure --prefix=/usr/local/nginx-1.6.0 --add-module=../nginx-sticky-module-1.25 --without-...

    Nginx 从安装到高可用详解.docx

    Nginx 安装和配置详解 ...http_gzip_static_module --http-client-body-temp-path=/var/temp/nginx/client --http-proxy-temp-path=/var/temp/nginx/proxy --http-fastcgi-temp-path=/var/temp/nginx/fastcgi --...

    php-7.1.29.tar.gz

    编译 ./configure --prefix=/usr/local/...curl --with-jpeg-dir --with-freetype-dir --enable-opcache --enable-fpm --enable-fastcgi --with-fpm-user=...

    php-7.3.0.tar.gz

    编译 ...pdo-mysql=shared,mysqlnd --with-gd --with-iconv --with-zlib --enable-zip --enable-inline-optimization -...jpeg-dir --with-freetype-dir --enable-opcache --enable-fpm --enable-fastcgi --with-fpm-user=...

    php-7.0.27.tar.gz

    编译 ./configure --prefix=/usr/local/...curl --with-jpeg-dir --with-freetype-dir --enable-opcache --enable-fpm --enable-fastcgi --with-fpm-user=...

    FreeBSD7.0编译安装nginx+php+mysql[定义].pdf

    数据库管理系统 MySQL 是一个流行的开源关系数据库管理系统,广泛应用于 Web 应用程序中。Nginx 是一个轻量级的 Web 服务器,可以作为静态资源服务器、反向代理服务器、负载均衡服务器等使用。PHP 是一个流行的开源...

Global site tag (gtag.js) - Google Analytics