I am running a PHP Script on the CLI (logged in as root). It is actually building a Zend Lucene Search index.
All output is logged to the command line. PHP directves like max_execution_time and memory_limit are set sufficient (0 resp. 1024M). The error reporting is set in the script as follows:
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
Ben elle bir istisna ise, CLI kaydedilir.
It works like a charm on Windows (scary?).
Debian Linux üzerinde her zaman (ilk belge Lucene endeksi taahhüt ediliyor, aslında tam olarak ne zaman, oradan Zend Framework kod) belli bir noktada asılı ve tüm CPU zamanını yeme durmadan çalışmaya devam eder. Hem -, Windows ve Debian - Zend Server CE (neredeyse) aynı konfigürasyonda (vb PHP 5.3.2) ile yüklenir.
Ben PHP CLI hata günlüğünü kontrol ettik (php-i | grep hatalar.log) ve düşünebildiğim diğer günlükleri - olmadan herhangi bir şans. Ben tarayıcıda komut çalıştırırsanız, aynı şey olur: Apache süreci sonsuza kadar kaçmaya devam ediyor.
Indeks dosyaları yaratılıyor, yani hiçbir dosya izni sorun yoktur. Ve Windows üzerinde çalışıyor beri ben, örneğin, bir programlama hatası ekarte inanıyorum sonsuz bir döngü.
Any ideas how to debug this? Any help pointing me in the right direction would be appreciated.
@Tim-Fountain: Thanks for the suggestion. I used strace to trace the PHP process and could locate the problematic part:
[...]
time(NULL) = 1279015138
lstat("/var/www/svn/trunk/application/../data/search/development.index.de/_c.cfs", 0x7fff4f54d720) = -1 ENOENT (No such file or directory)
open("/var/www/svn/trunk/data/search/development.index.de/_c.cfs", O_RDWR|O_CREAT|O_TRUNC, 0666) = 22
fstat(22, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
lseek(22, 0, SEEK_CUR) = 0
chmod("/var/www/svn/trunk/application/../data/search/development.index.de/_c.cfs", 0666) = 0
write(22, "\10"..., 1) = 1
write(22, "\0\0\0\0\0\0\0\0"..., 8) = 8
write(22, "\6"..., 1) = 1
write(22, "_c.fdx"..., 6) = 6
write(22, "\0\0\0\0\0\0\0\0"..., 8) = 8
write(22, "\6"..., 1) = 1
write(22, "_c.fdt"..., 6) = 6
write(22, "\0\0\0\0\0\0\0\0"..., 8) = 8
write(22, "\6"..., 1) = 1
write(22, "_c.fnm"..., 6) = 6
write(22, "\0\0\0\0\0\0\0\0"..., 8) = 8
write(22, "\6"..., 1) = 1
write(22, "_c.nrm"..., 6) = 6
write(22, "\0\0\0\0\0\0\0\0"..., 8) = 8
write(22, "\6"..., 1) = 1
write(22, "_c.tis"..., 6) = 6
write(22, "\0\0\0\0\0\0\0\0"..., 8) = 8
write(22, "\6"..., 1) = 1
write(22, "_c.tii"..., 6) = 6
write(22, "\0\0\0\0\0\0\0\0"..., 8) = 8
write(22, "\6"..., 1) = 1
write(22, "_c.frq"..., 6) = 6
write(22, "\0\0\0\0\0\0\0\0"..., 8) = 8
write(22, "\6"..., 1) = 1
write(22, "_c.prx"..., 6) = 6
lseek(22, 1, SEEK_SET) = 1
write(22, "\0\0\0\0\0\0\0y"..., 8) = 8
lseek(22, 121, SEEK_SET) = 121
lseek(13, 0, SEEK_SET) = 0
lseek(13, 0, SEEK_END) = 8
lseek(13, 0, SEEK_SET) = 0
read(13, "\0\0\0\0\0\0\0\0"..., 8192) = 8
write(22, "\0\0\0\0\0\0\0\0"..., 8) = 8
close(13) = 0
unlink("/var/www/svn/trunk/application/../data/search/development.index.de/_c.fdx") = 0
lseek(22, 16, SEEK_SET) = 16
write(22, "\0\0\0\0\0\0\0\201"..., 8) = 8
lseek(22, 129, SEEK_SET) = 129
lseek(14, 0, SEEK_SET) = 0
lseek(14, 0, SEEK_END) = 3465
lseek(14, 0, SEEK_SET) = 0
read(14, "\20\0\0\0011\1\0\7Event-1\2\0\003455\3\0\0\4\1\5Event\6"..., 8192) = 3465
read(14, ""..., 8192) = 0
write(22, "\20\0\0\0011\1\0\7Event-1\2\0\003455\3\0\0\4\1\5Event\6"..., 3465) = 3465
read(14, ""..., 8192) = 0
read(14, ""..., 8192) = 0
read(14, ""..., 8192) = 0
read(14, ""..., 8192) = 0
read(14, ""..., 8192) = 0
read(14, ""..., 8192) = 0
read(14, ""..., 8192) = 0
[... from here it keeps on repeating this same line ...]
The file "_c.cfs" is actually existing and has 0666 permissions.
I am not shure how to read this. The last line repeats endlessly. Any ideas?