[user] 于非问题

Issue #214 resolved
quasimo created an issue
  1. [fixed] 安装wordpress出现多重重定向(这个问题几严重) 屏幕快照 2015-06-19 下午6.32.40.png

  2. Using WPCACHE which point to the app home directory

  3. [fixed] 导入数据库出现这个问题:

    INSERT INTO `wp_wfLeechers` (`eMin`, `IP`, `hits`) VALUES (23905707,'\0\0\0\0\0\0\0\0\0\0??2??',1),(23905731,'\0\0\0\0\0\0\0\0\0\0??w?3?,2); 
    /*!40000 ALTER TABLE `wp_wfLeechers` ENABLE KEYS /;
    UNLOCK TABLES; 
    --
    -- Table structure for table `wp_wfLockedOut` 
    --
    DROP TABLE IF EXISTS `wp_wfLockedOut`; 
    /*!40101 SET @saved_cs_client = @@character_set_client /; 
    /*!40101 SET character_set_client = utf8 /; 
    CREATE TABLE `wp_wfLockedOut` ( `IP` binary(16) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', `blockedTime` bigint(20) NOT NULL, `reason` varchar(255) NOT NULL, `lastAttempt` int(10) unsigned DEFAULT '0', `blockedHits` int(10) unsigned DEFAULT '0', PRIMARY KEY (`IP`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
    /*!40101 SET character_set_client = @saved_cs_client /; 
    -- 
    -- Dumping data for table `wp_wfLockedOut` 
    -- 
    LOCK TABLES `wp_wfLockedOut` WRITE; 
    /*!40000 ALTER TABLE `wp_wfLockedOut` DISABLE KEYS /; 
    /*!40000 ALTER TABLE `wp_wfLockedOut` ENABLE KEYS /; 
    UNLOCK TABL[...]
    
  4. [fixed] wordpress wp-admin 进不去,会重定向到: http://gooclasshk-phxyufei.app.cnpaas.io/phpmyadminwp-admin/ 这意味着可能我们平台上的wordpress应用是进不去后台的。

  5. 503 error when creating posts

Comments (15)

  1. quasimo reporter

    http://wp-phxyufei.app.cnpaas.io

    用于测试于非问题的一个demo, 现在柳暗花明又一村, 细节我迟点再说明。

  2. LiAh Sheep

    php.log 裏面有幾句值得留意:

    [Tue Jun 23 17:03:40 2015] [error] [client 127.2.72.129] WordPress 資料庫錯誤: Table 'wp_posts' is marked as crashed and should be repaired 由指令 SELECT SQL_CALC_FOUND_ROWS  wp_posts.ID FROM wp_posts  INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1  AND ( \n  wp_term_relationships.term_taxonomy_id IN (20,21,22,23,182)\n) AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish') GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 12 引發,錯誤來自 require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/slimvideo/page.php'), LayoutCompilator::run, LayoutCompilator::build_content, LayoutCompilator::compile_element, LayoutCompilator::last_posts_element, WP_Query->__construct, WP_Query->query, WP_Query->get_posts
    [Tue Jun 23 17:03:44 2015] [error] [client 127.2.72.129] WordPress 資料庫錯誤: Incorrect key file for table './gooclasshk/wp_terms.MYI'; try to repair it 由指令 SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = 'nav_menu' AND t.slug = '30' LIMIT 1 引發,錯誤來自 require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/slimvideo/single-video.php'), get_header, locate_template, load_template, require_once('/themes/slimvideo/header.php'), wp_nav_menu, wp_get_nav_menu_object, get_term_by, referer: http://gooclasshk-phxyufei.app.cnpaas.io/wp-admin/post.php?post=2256&action=edit
    [Tue Jun 23 17:03:44 2015] [error] [client 127.2.72.129] WordPress 資料庫錯誤: Incorrect key file for table './gooclasshk/wp_terms.MYI'; try to repair it 由指令 SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = 'nav_menu' AND t.name = '30' LIMIT 1 引發,錯誤來自 require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/slimvideo/single-video.php'), get_header, locate_template, load_template, require_once('/themes/slimvideo/header.php'), wp_nav_menu, wp_get_nav_menu_object, get_term_by, referer: http://gooclasshk-phxyufei.app.cnpaas.io/wp-admin/post.php?post=2256&action=edit
    [Tue Jun 23 17:05:20 2015] [error] [client 127.2.72.129] WordPress 資料庫錯誤: Table 'wp_posts' is marked as crashed and should be repaired 由指令 SELECT * FROM wp_posts  WHERE (post_type = 'page' AND post_status = 'publish')  AND ID NOT IN (513,511)    ORDER BY menu_order,wp_posts.post_title ASC 引發,錯誤來自 require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/slimvideo/single-video.php'), get_header, locate_template, load_template, require_once('/themes/slimvideo/header.php'), wp_nav_menu, call_user_func, wp_page_menu, wp_list_pages, get_pages, referer: http://gooclasshk-phxyufei.app.cnpaas.io/wp-admin/post.php?post=2256&action=edit
    [Tue Jun 23 17:27:52 2015] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:openshift_t:s0:c1,c147
    [Tue Jun 23 17:28:03 2015] [notice] Digest: generating secret for digest authentication ...
    [Tue Jun 23 17:28:03 2015] [notice] Digest: done
    [Tue Jun 23 17:28:03 2015] [notice] Apache/2.2.15 (Unix) configured -- resuming normal operations
    

    時序:

    1. Log: [Tue Jun 23 17:03:40 2015] => Table 'wp_posts' is marked as crashed and should be repaired
    2. Skype: [2015/06/23 17:08:14] Lin Zhizhao: 请问大家现在打开 http://gooclasshk-phxyufei.app.cnpaas.io 是不是显示“Service Temporarily Unavailable” ?
    3. Skype: [2015/06/23 17:09:13] Lin Zhizhao: 知道原因吗?于非刚才尝试新增一篇文章后,就这样。
    4. Skype: [2015/06/23 17:18:40] Lin Zhizhao: 是503的错。我在想会不会是内存被吃了?
    5. Log: [Tue Jun 23 17:28:03 2015] => Apache/2.2.15 (Unix) configured -- resuming normal operations
    6. Skype: [2015/06/23 17:28:32] LiAh Sheep: 我人手restart了
    7. Skype: [2015/06/23 17:28:38] LiAh Sheep: 現在又開返

    Repair?

    http://wpgarage.com/good-blogging-practice/crash-burn-how-to-repair-tables-in-the-wordpress-database/

  3. Jimmy Chu

    After rhc ssh into a user app, we could use oo-cgroup-read report | python -m json.tool to investigate current app memory usage. memory.memsw.failcnt is also recorded below because it is a good indicator for mem limit violation. See here

    For Yu Fei app, after setting up the site.

    "memory.limit_in_bytes": "268435456",
    "memory.memsw.failcnt": "50656",
    "memory.usage_in_bytes": "245051392",  # close to reaching mem limit
    

    Then when adding a post,

    "memory.limit_in_bytes": "268435456",
    "memory.memsw.failcnt": "57444",   # cnt increased
    "memory.usage_in_bytes": "268353536", 
    

    Then, it quickly dropped to,

    "memory.limit_in_bytes": "268435456",
    "memory.memsw.failcnt": "57444",
    "memory.usage_in_bytes": "70316032",
    
  4. Log in to comment