我遇到一个问题,那就是我没有看到一个简单的解决scheme,但是我用googlesearch了一下,结果无济于事。
我遇到的问题是,当我做一个服务器(物理机)重新启动,每次Apache告诉我, /tmp/apache2-gbd-dump不存在,并检查httpd.conf文件。 那么我检查conf文件,并确定它正在调用一个/tmp/apache2-gbd-dump为核心转储。 问题是这个文件实际上并不存在 。 当我查看日志时,这是唯一与启动失败相关的警告/错误。
所以我试着创build这个文件,把它www-data:www-data然后chmod到777 。 而这个作品 ,我现在可以sudo service apache2 start 。 一旦我重新启动物理机器,Core Dump文件就会消失,我必须手动重新创build文件才能启动Apache,因为它是自动启动的。 当这变成生产服务器时,这显然不起作用。 有没有人有任何的洞察力,我可以看看到底为什么发生这种情况? 这里是conf文件里面的代码,如果有人看到一个相关的问题,你能指出吗?
CoreDumpDirectory /tmp/apache2-gdb-dump LockFile ${APACHE_LOCK_DIR}/accept.lock PidFile ${APACHE_PID_FILE} Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 5 <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 </IfModule> <IfModule mpm_worker_module> StartServers 2 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxClients 150 MaxRequestsPerChild 0 </IfModule> <IfModule mpm_event_module> StartServers 2 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxClients 150 MaxRequestsPerChild 0 </IfModule> User ${APACHE_RUN_USER} Group ${APACHE_RUN_GROUP} AccessFileName .htaccess <Files ~ "^\.ht"> Order allow,deny Deny from all Satisfy all </Files> DefaultType None HostnameLookups Off ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn Include mods-enabled/*.load Include mods-enabled/*.conf Include httpd.conf Include ports.conf LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %O" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent Include conf.d/ Include sites-enabled/
我认为你的/ tmp是一个tmpfs挂载。 您需要将核心path更改为在/ var或其他地方。
请参阅man core页面中的core_pattern 。