gpt4 book ai didi

mysql - 托管 magento 的 plesk VPS 问题出现问题。 #sql_1ed7_0.MYD in/tmp 关闭服务器

转载 作者:行者123 更新时间:2023-11-29 01:56:37 27 4
gpt4 key购买 nike

希望有人能帮忙!我一直在/tmp 中创建这些文件,这在尝试访问 Web 甚至 plesk 面板时会在下面产生错误,直到我通过 SSH 或 FTP 进入并手动删除它 (#sql_1ed7_0.MYD):

ERROR: Zend_Db_Statement_Exception: SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_1ed7_0.MYD' (Errcode: 17) (Pdo.php:234)

MySQL 日志中没有任何内容,将 my.cnf 中的 mysql tmp 目录更改为 home/mysqltmp 并且仍然发生,所以看起来不是问题所在。我认为它可能与 httpd.conf 有关,这是它在 apache error_log 中发生时的日志:

[Fri Nov 28 16:09:21 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Core/Model/Resource/Store/Collection.php - Too many open files in system (pid 15876)
[Fri Nov 28 16:09:21 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/local/Sns/Quickview/Helper/Data.php - Too many open files in system (pid 15876)
[Fri Nov 28 16:09:22 2014] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Nov 28 16:09:22 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Core/Model/Resource/Website.php - Too many open files in system (pid 15872)
[Fri Nov 28 16:09:22 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image.php - Too many open files in system (pid 15869)
[Fri Nov 28 16:09:22 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Catalog/Model/Resource/Category/Tree.php - Too many open files in system (pid 15858)
[Fri Nov 28 16:09:22 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php - Too many open files in system (pid 15876)
[Fri Nov 28 16:09:22 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Core/Helper/Abstract.php - Too many open files in system (pid 15872)
[Fri Nov 28 16:09:22 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Catalog/Model/Product.php - Too many open files in system (pid 15856)
[Fri Nov 28 16:09:22 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Image.php - Too many open files in system (pid 15872)
[Fri Nov 28 16:09:22 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Directory/Block/Currency.php - Too many open files in system (pid 15872)
[Fri Nov 28 16:09:22 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/GoogleAnalytics/Block/Ga.php - Too many open files in system (pid 15872)
[Fri Nov 28 16:09:22 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/design/frontend/default/sns_kalins/template/directory/currency.phtml - Too many open files in system (pid 15856)
[Fri Nov 28 16:09:22 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Shipping/Model/Config.php - Too many open files in system (pid 15872)
[Fri Nov 28 16:09:23 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/local/Sns/Ajaxcart/Helper/Core/Url.php - Too many open files in system (pid 15856)
[Fri Nov 28 16:09:23 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/lib/Varien/Db/Ddl/Table.php - Too many open files in system (pid 15876)
[Fri Nov 28 16:09:23 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/lib/Varien/Event/Observer.php - Too many open files in system (pid 15876)
[Fri Nov 28 16:09:23 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Core/Model/Config/Data.php - Too many open files in system (pid 15876)
[Fri Nov 28 16:09:23 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Core/Controller/Request/Http.php - Too many open files in system (pid 15869)
[Fri Nov 28 16:09:24 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Core/Model/Config/Data.php - Too many open files in system (pid 15876)
[Fri Nov 28 16:09:24 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Adminhtml/Helper/Data.php - Too many open files in system (pid 15874)
[Fri Nov 28 16:09:24 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Catalog/controllers/CategoryController.php - Too many open files in system (pid 15874)
[Fri Nov 28 16:09:24 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/lib/Zend/Cache/Core.php - Too many open files in system (pid 15876)
[Fri Nov 28 16:09:24 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Core/Model/Config/Base.php - Too many open files in system (pid 15856)
[Fri Nov 28 16:09:24 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Core/Model/Resource/Store/Group/Collection.php - Too many open files in system (pid 15876)
[Fri Nov 28 16:09:24 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Router/Abstract.php - Too many open files in system (pid 15874)
[Fri Nov 28 16:09:24 2014] [warn-phpd] mmap cache can't open /var/www/vhosts/.com/httpdocs/app/code/core/Mage/Core/Controller/Request/Http.php - Too many open files in system (pid 15869)
[Fri Nov 28 16:09:42 2014] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Nov 28 16:09:52 2014] [error] (12)Cannot allocate memory: fork: Unable to fork new process
[Fri Nov 28 17:25:51 2014] [notice] caught SIGTERM, shutting down
[Fri Nov 28 17:25:53 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Nov 28 17:25:54 2014] [warn] RSA server certificate
[Fri Nov 28 17:25:55 2014] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Fri Nov 28 17:25:55 2014] [notice] mod_python: using mutex_directory /tmp

完全不知所措....谷歌无处可去:(刚刚在magento中安装了一个完整的页面缓存模块,我认为这是日志中缓存文件错误的来源,但它是在这个问题开始后安装的。

不想一直保姆服务器一次又一次地删除这个文件。

值得注意的是/tmp 目录 (1777) 的权限没有问题,但是创建的文件具有 644 的权限,一旦我删除它,所有内容都会备份。

最佳答案

Magento 似乎没有什么问题。您的 apache 日志说:系统中打开的文件太多。

您需要增加允许打开的文件描述符的最大数量。为此,找到 Apache 初始化脚本并在其中添加下一行:

ulimit -n 65536 

通常,Apache init 脚本放在/etc/init.d/apache2 或/etc/init.d/httpd 路径中。

结果看起来像:

#!/bin/sh
### BEGIN INIT INFO
# Provides: apache2
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: true
# Short-Description: Start/stop apache2 web server ### END INIT INFO
set -e
ulimit -n 65536

重启Apache后:

/etc/init.d/apache2 restart

关于mysql - 托管 magento 的 plesk VPS 问题出现问题。 #sql_1ed7_0.MYD in/tmp 关闭服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27212763/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com