我的IIS非常不稳定,因为它总是因为某种原因重新启动它与APC相关。
服务器的规格低于
Intel R Xeon CPU 3GHZ 3GHZ
2GB RAM
64bit
APC&服务器规范
3.1.7-dev
PHP Version 5.3.6
APC Host localhost
Server Software Microsoft-IIS/7.5
Shared Memory 1 Segment(s) with 1024.0 MBytes
(IPC shared memory, File Locks locking)
extension=php_apc.dll
apc.shm_size=1024M
apc.num_files_hint=10000
apc.user_entries_hint=10000
apc.max_file_size=5M
错误的PHP日志文件
28-Jul-2011 09:23:14] PHP Fatal error: Unknown: apc_fcntl_lock failed errno:6 in Unknown on line 0
[28-Jul-2011 09:23:14] PHP Fatal error: Unknown: apc_fcntl_lock failed errno:6 in Unknown on line 0
[28-Jul-2011 09:24:23] PHP Notice: Undefined index: SERVER_ADDR in C:\inetpub\wwwroot\apc.php on line 68
[28-Jul-2011 09:24:24] PHP Notice: Undefined index: SERVER_ADDR in C:\inetpub\wwwroot\apc.php on line 68
[28-Jul-2011 09:24:24] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for '8.0/no DST' instead in C:\inetpub\wwwroot\apc.php on line 1122
[28-Jul-2011 09:24:24] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for '8.0/no DST' instead in C:\inetpub\wwwroot\apc.php on line 1123
[28-Jul-2011 09:24:24] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for '8.0/no DST' instead in C:\inetpub\wwwroot\apc.php on line 1124
[28-Jul-2011 09:24:30] PHP Notice: Undefined index: SERVER_ADDR in C:\inetpub\wwwroot\apc.php on line 68
[28-Jul-2011 09:24:30]
我无法弄清楚导致IIS重启的错误是什么导致 apc_fcntl_lock失败的错误:6 。 我的项目存储了高达1GB的缓存数据,因此解释了shm设置为1024M
当我在浏览器上重新加载apc.php页面时,似乎更常出现问题 HTTP错误500.0 - 内部服务器错误 C:\ PHP \ php-cgi.exe - FastCGI进程意外退出
我的缓存被重置,我将再次重新缓存我的数据。
我的LINUX服务器工作正常。我的APC配置有问题吗?
答案 0 :(得分:1)
我认为这不是APC配置本身的问题,但更可能是在Windows上处理文件锁定的问题。我在APC源代码中查找了apc_fcntl_lock,它非常简单,并且几个月没有更改。
如果您只运行一个工作进程,则可以尝试设置apc.write_lock = 0并查看是否有帮助。
否则,您可以尝试使用旧版本的PHP(或5.3.7RC3),以防APC与PHP交互的方式出现问题(尽管可能不太可能)。
最后,如果这不起作用,可以尝试不同的操作码缓存;例如xcache。