我们使用Nginx + PHP + FastCGI作为我们的Web服务器,我们在错误日志中看到了一堆超时错误(见下文)。 我们很快重新启动了nginx,并解决了问题 – 现在。 但是,我们正试图find根本原因并解决问题,所以不会再发生。 特别, 你能向我们解释这个错误还是指出我们朝着正确的方向? 看起来我们一起发生了两个错误:18657(连接失败)和18656(上游超时)。 他们什么时候发生? 有没有办法看到错误发生时服务器上的networking统计信息? 我们希望看到有多less个php进程,入站连接等,当我们遇到问题的时候。 我们怎么能重现这个问题,并确定它? 这里是错误(我们看到数百个,发表了一些): error.log:2011/08/04 19:31:44 [error] 18657#0:* 464859 connect()失败(110:连接超时)连接上游时,client:166.205.138.117,server:api.website .com,请求:“POST / v3 / logAgentEvent HTTP / 1.1”,上游:“fastcgi://127.0.0.1:9000”,主机:“api.website.com” error.log:2011/08/04 19:31:44 [error] 18656#0:* 464476上行超时(110:连接超时),从上游读取响应头时,客户端:98.140.86.90,server:api。 website.com,请求:“POST / v3 / logAgentEvent HTTP / 1.1”,上游:“fastcgi://127.0.0.1:9000”,主机:“api.website.com”
那么这是对此的一种转发,但目前还没有人回答我的问题,所以我就在这里。 我正在使用Apache / 2.2.17(Ubuntu)mod_fastcgi与php-fpm,我无法启用干净的URL作为网站返回内部服务器错误。 我认为我的.htaccess设置中有些东西不对。 相同的服务器包含不同的虚拟主机下的Wordpress,它工作正常。 这是我希望可以帮助找出问题的一些相关信息。 我的虚拟主机包含: <VirtualHost *:80> ServerName example.com ServerAlias www.example.com DocumentRoot /home/dowsin/public_html FastCgiExternalServer /home/dowsin/public_html/php5.external -host 127.0.0.1:9000 AddHandler php5-fcgi .php Action php5-fcgi /usr/lib/cgi-bin/php5.external Alias /usr/lib/cgi-bin/ /home/dowsin/public_html/ RewriteLog "/home/dowsin/public_html/rewrite.log" RewriteLogLevel 9 <Directory "/home/dowsin/public_html"> allow from all Options -Indexes AllowOverride all </Directory> </VirtualHost> .htaccess包含 RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d […]
我有NGiNX设置,并希望能够运行我在Ruby中创build的网站。 然而,我的服务器是相当的失败,只有250MB的内存,可能更less,所以,而不是必须与瘦服务器运行每个Ruby站点,我想运行的Ruby网站,只有当他们被访问,就像PHP的方式与PHP- FPM服务器。 如何用NGiNX和Ruby去解决这个问题?
我正在寻找一个命令行启动HTTP服务器( àlattttd – 即不需要系统configuration),但它支持通用fastcgi – 最好是可以自己pipe理fastcgi服务器,如Apache的mod_fcgid可以。 这样的事情存在吗?
我有一个外部启动的FastCGI应用程序,它侦听套接字“/tmp/foo.sock”和静态文件目录“/ srv / static”。 Apache在套接字和目录上都具有所需的权限。 我需要:所有以'/ static'开头的请求都应该由apache使用'/ srv / static'的内容来处理。 所有其他请求应该由FastCGI应用程序处理。 这是我目前的虚拟主机configuration: <VirtualHost *:80> ServerAdmin [email protected] ServerName www.foo.com ServerAlias foo.com Alias /static /srv/static FastCgiExternalServer /* -socket /tmp/foo.sock ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined </VirtualHost> 虽然这看起来很简单,但是让我很头痛。 根据http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html#FastCgiExternalServer'FastCgiExternalServer '的第一个参数应该是'文件名',当匹配时会导致Apache将请求委托给外部的FastCGI应用程序。 我在这里错过了什么?
我使用lighttpd作为networking服务器,模块mod_fastcgi打开。 所以我可以用lighttpd获取php file 。 这是我的configuration文件的一部分。 fastcgi.server =( ".php"=> ( ( "bin-path" => "/usr/local/webserver/php/bin/php-cgi", "socket" => "/data/online/webim/socket/php-fcgi.socket", "min-procs" => 100, "max-procs" => 100, "check-local" => "disable", "bin-environment" => ( "PHP_FCGI_CHILDREN" => "10", "PHP_FCGI_MAX_REQUESTS" => "1000" ), "bin-copy-environment" => ( "PATH", "SHELL", "USER" ), "broken-scriptfilename" => "enable" ) ) ) 有一次,我犯了一个错误。 syntax error留在php文件中。 然后,我发送了很多(10000)的请求到networking服务器。 很快,php-cgi使用的内存开始increase crazily地increase crazily […]
我有一个URL的问题。 我可以访问djando应用程序主页(localhost / djangotest /),但不能访问pipe理部分(localhost / djangotest / admin /)。 我可以使用django服务器而不是lighttpd访问它。 Lighttp conf: fastcgi.server = ( "/djangotest/" => ( "main" => ( "host" => "127.0.0.1", "port" => 3033, "check-local" => "disable", ) ), ) url.rewrite-once = ( "^(/media.*)$" => "$1", "^/favicon\.ico$" => "/media/favicon.ico", "^/djangotest/[^?](.*)$" => "/djangotest/?$1", ) Django的url.py只是:(我只是取消注释好行): from django.conf.urls.defaults import patterns, include, url from […]
任何人都可以在我的nginx错误日志中的以下行上说明一些情况。 我正试图让Perl和Nginx互相交谈,但迄今为止没有成功。 unix:/var/run/nginx/cgiwrap-dispatch.sock failed (111: Connection refused)2011/11/20 09:18:34 [error] 24054#0: *1186 connect() to unix:/var/run/nginx/cgiwrap-dispatch.sock failed (111: Connection refused) while connecting to upstream, client: 150.101.221.75, server: example.com, request: "GET /dspam.cgi HTTP/1.1", upstream: "fastcgi://unix:/var/run/nginx/cgiwrap-dispatch.sock:", host: "example.com" 相关的nginxconfiguration。 location ~ \.cgi$ { gzip off; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/run/fcgiwrap.socket; fastcgi_index index.pl; fastcgi_param SCRIPT_FILENAME /var/www/dspam$fastcgi_script_name; }
我有nginx加快cgi。 我用快速cgi开始脚本启动nginx。 但是在nginx更新之后,系统会把这个脚本重写为默认只启动nginx。 有什么办法可以避免这种重写?
我最近将mod_fcgi安装到Amazon EC2 64位Linux AMI上,并使用Movable Type 5.13。 这是我的错误日志。 [warn]mod_fcgid: error reading data, FastCGI server closed connection, referer: http://xxx/mt.fcgi?__mode=start_rebuild&old_previous=1&is_new=0&next=0&old_status=2&type=entry-1&blog_id=1&entry_id=1 [error]Premature end of script headers: mt.fcgi, referer: http://xxx/mt.fcgi?__mode=start_rebuild&old_previous=1&is_new=0&next=0&old_status=2&type=entry-1&blog_id=1&entry_id=1 我的.conf文件是/etc/httpd/conf.d/fcgid.conf LoadModule fcgid_module modules/mod_fcgid.so # Use FastCGI to process .fcg .fcgi & .fpl scripts AddHandler fcgid-script fcg fcgi fpl .cgi # Sane place to put sockets and shared memory file […]