Estou usando o Lighttpd / PHP-CGI em uma máquina com Windows XP.
Eu estava usando a interface CGI normal, que é muito estável, mas eu tentei o FastCGI e adorei o aumento de velocidade. No entanto, mesmo sob carga leve, o daemon PHP-CGI irá travar após uma hora ou mais.
Tomei o cuidado de eliminar todos os avisos e avisos que são enviados para o log de erros. Meu servidor tem cerca de 1500 MB de RAM em excesso quando ele falha, então esse não é o problema.
Apenas visitando o site e pressionando F5 por aproximadamente 30 segundos, o PHP-CGI será travado com um log de erros em branco. Alguem sabe o que poderia estar causando isso? Existe algum erro adicional relatando que eu poderia usar, ou qualquer gotchya de que eu não saiba?
php.ini
:
;NOTE: THE ONLY LINE THAT'S NOT DEFAULT TO php.ini-production IS "error_log = F:/php_errors.log"
[PHP]
engine = On
short_open_tag = Off
asp_tags = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 17
disable_functions =
disable_classes =
zend.enable_gc = On
expose_php = On
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
html_errors = On
error_log = F:/php_errors.log
variables_order = "GPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 8M
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
doc_root =
user_dir =
enable_dl = Off
file_uploads = On
upload_max_filesize = 2M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
[CLI Server]
cli_server.color = On
[Date]
[filter]
[iconv]
[intl]
[sqlite]
[sqlite3]
[Pcre]
[Pdo]
[Pdo_mysql]
pdo_mysql.cache_size = 2000
pdo_mysql.default_socket=
[Phar]
[mail function]
SMTP = localhost
smtp_port = 25
mail.add_x_header = On
[SQL]
sql.safe_mode = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[Interbase]
ibase.allow_persistent = 1
ibase.max_persistent = -1
ibase.max_links = -1
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
ibase.dateformat = "%Y-%m-%d"
ibase.timeformat = "%H:%M:%S"
[MySQL]
mysql.allow_local_infile = On
mysql.allow_persistent = On
mysql.cache_size = 2000
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off
[MySQLi]
mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.cache_size = 2000
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
[mysqlnd]
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = Off
[OCI8]
[PostgreSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[Sybase-CT]
sybct.allow_persistent = On
sybct.max_persistent = -1
sybct.max_links = -1
sybct.min_server_severity = 10
sybct.min_client_severity = 10
[bcmath]
bcmath.scale = 0
[browscap]
[Session]
session.save_handler = files
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = Off
session.bug_compat_warn = Off
session.referer_check =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
[MSSQL]
mssql.allow_persistent = On
mssql.max_persistent = -1
mssql.max_links = -1
mssql.min_error_severity = 10
mssql.min_message_severity = 10
mssql.compatability_mode = Off
mssql.secure_connection = Off
[Assertion]
[COM]
[mbstring]
[gd]
[exif]
[Tidy]
tidy.clean_output = Off
[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
soap.wsdl_cache_limit = 5
[sysvshm]
[ldap]
ldap.max_links = -1
[mcrypt]
[dba]
lighttpd.conf
:
server.modules = (
"mod_access",
"mod_accesslog",
"mod_fastcgi",
"mod_redirect",
"mod_rewrite",
"mod_status",
)
include "variables.conf"
include "mimetype.conf"
server.document-root = server_root + "/htdocs"
server.upload-dirs = ( temp_dir )
index-file.names = ( "index.php", "index.pl", "index.cgi", "index.cml",
"index.html", "index.htm", "default.htm" )
server.event-handler = "libev"
url.access-deny = ( "~", ".inc" )
$HTTP["url"] =~ "\.pdf$" {
server.range-requests = "disable"
}
static-file.exclude-extensions = ( ".php", ".pl", ".cgi" )
dir-listing.activate = "enable"
status.status-url = "/server-status"
status.config-url = "/server-config"
fastcgi.server = ( ".php" =>( "localhost" =>("host" => "127.0.0.1","port" => 521 )))
#Probably irrelevant
$HTTP["url"] !~ "^/index.php?.*$|^/$|^/style.css$|^/random.php$|^/latest.php$|^/images/[^\.]*\.[^\.]*$|^/deviant/[^\.]*\.[^\.]*$|^/ie-css3.htc$|^/markdown.js$" {
url.access-deny = ("")
}
url.rewrite-once = (
"^/post/(.*)$" => "/index.php?page=readpost.php&postid=$1"
,"^/comment/(.*)$" => "/index.php?page=comment.php&target=$1"
,"^/random$" => "/random.php"
,"^/latest$" => "/latest.php"
,"^/posted$" => "/index.php?page=posted.php"
,"^/style$" => "/index.php?page=style.css"
,"^/index.php.*$" => "/"
,"^/register$" => "/index.php?page=register.php"
,"^/registered$" => "/index.php?page=registered.php"
,"^/login$" => "/index.php?page=login.php"
,"^/loggedin$" => "/index.php?page=loggedin.php"
,"^/logout$" => "/index.php?page=logout.php"
,"^/blogupdate$" => "/index.php?page=blogupdate.php"
,"^/blogged$" => "/index.php?page=blogupdated.php"
,"^/deletepost/(.*)$" => "/index.php?page=deletepost.php&post=$1"
,"^/deleteblog/(.*)$" => "/index.php?page=deleteblog.php&post=$1"
)
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.ca-file = "f:/www/ca-certs.crt"
ssl.pemfile = "f:/www/ssl.crt"
}
server.max-fds = 2048
Editar: Eu apenas tentei segurar F5 com o único script sendo executado em <?PHP die("alive"); ?>
e o PHP ainda está travando.