我刚从
Ubuntu 14号
具有
菲律宾比索5.6
乌班图18.04
具有
pH7.2级
我的服务器规范是:
服务器版本:Apache/2.4.29(Ubuntu)
服务器建成时间:2019-09-16T12:58:48
菲律宾比索7.2.24
我注意到我有很多apache2进程有时会打开,我的服务器会崩溃,我需要重新启动mysql和apache。
通过一些测试,我终于找到了问题的根源:
我有一个在Magento中导入客户的脚本(非常基本),实际上有很多脚本,当我运行它们时,所有这些进程都会被创建。
谢谢,谢谢你的帮助。
这些模块当前在apache2中启用:
core_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
access_compat_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cache_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
expires_module (shared)
file_cache_module (shared)
filter_module (shared)
headers_module (shared)
mime_module (shared)
mpm_prefork_module (shared)
negotiation_module (shared)
php7_module (shared)
proxy_module (shared)
proxy_balancer_module (shared)
proxy_http_module (shared)
reqtimeout_module (shared)
rewrite_module (shared)
setenvif_module (shared)
slotmem_shm_module (shared)
socache_shmcb_module (shared)
ssl_module (shared)
status_module (shared)
unique_id_module (shared)
require_once(realpath(__DIR__) . '/bootstrap.php');
$websiteId = 237;
$storeId = 0;
$row = 1;
$myfile = fopen("../errors.txt", "w+") or die("Unable to open file!");
if (($handle = fopen("staff.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$roles = $data[6];
$xname = explode(" ", $data[0]);
$pass = "pass"; [5]."\n";}
$customer = Mage::getModel("customer/customer");
$customer->setWebsiteId($websiteId)
->setStoreId($storeId)
->setFirstname($data[0])
->setLastname($data[1])
->setEmail($data[3])
->setTelephone('01234567')
->setPassword($pass);
try{
$customer->save();
}
catch (Exception $e) {
Zend_Debug::dump($e->getMessage());
}
}
fclose($handle);
}
?>
引导代码:
ini_set('memory_limit', '1024M');
set_time_limit(0);
require_once realpath(__DIR__) . '/../../../www/app/Mage.php';
Mage::setIsDeveloperMode(true);
Mage::app('admin')->setUseSessionInUrl(false);
$userModel = Mage::getModel('admin/user');
$userModel->setUserId(0);
Mage::getSingleton('admin/session')->setUser($userModel);
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
error_reporting(-1);
ini_set('display_errors', 1);
?>