Join the community today
Register Now

Redis Nginx Redis + Wordpress

Discussion in 'Centmin Mod Insights' started by Sunka, Jan 17, 2016.

  1. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    4:57 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    Regarded Nginx Level Redis Cache, in instructions said that


    But I allready have that file on server which is automatically creted when I use option 22 to install wordpress via Centminmod. I selected the option to use Cache Enabler instead of super cache. Content of that default file is little different:

    Code:
    set $skip_cache 0;
    
    # POST requests and urls with a query string should always go to PHP
    if ($request_method = POST) {
      set $skip_cache 1;
    }
    
    if ($query_string != "") {
      set $skip_cache 1;
    }
    
    # Don't cache uris containing the following segments
    if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml") {
      set $skip_cache 1;
    }
    
    # Don't use the cache for logged in users or recent commenters
    if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
      set $skip_cache 1;
    }
    
    location /redis-fetch {
      internal  ;
      set  $redis_key $args;
      redis_pass  redisbackend;
      redis_connect_timeout 60000;
      redis_read_timeout 60000;
      redis_send_timeout 60000;
    }
    
    location /redis-store {
      internal  ;
      set_unescape_uri $key $arg_key ;
      redis2_query set $key $echo_request_body;
      redis2_query expire $key 6h;
      redis2_pass  redisbackend;
      redis2_connect_timeout 60s;
      redis2_read_timeout 60s;
      redis2_send_timeout 60s;
    }
    Should I just use default file or I need to merge something in it from your sggested file @eva2000 ?

    Also, all other steps in instruction are good to continue (just replace Cache Enabler instances instead of super cache for comment out).
     
  2. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    12:57 PM
    Nginx 1.13.x
    MariaDB 5.5
    just use the auto generated one that's what it's for :)
     
    • Informative Informative x 1
  3. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    4:57 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    Maybe is not connected with this, but maybe it is.
    wordpres iss installed on subdomain, and yesterday I switch wordpress to Nginx Level Redis Cache.

    Today, all day I have problem with my forum which is also on Redis cache, and all day more or less pages on forum not loaded with all css, or javascript, or error 500. Something similiar what I have seen here on this board from time to time.

    I went to wordpress ACP and purge all cache from there, and my forum is loading OK right now.

    Could this error be related to redis cache because both forum and wordpress is on same nginx redis cache, or something else is behind all that?

    Some logs, but nothing new in there, as I read every day. Maybe this first one (www-php.error.log) is with new stuff, all others are similiar from day to day:

    Code:
    [root@tvor-ocean ~]# tail -10 /var/log/php-fpm/www-php.error.log
    [18-Jan-2016 19:59:44 UTC] PHP Fatal error:  Zend_Cache::throwException(): Failed opening required 'Zend/Cache/Exception.php' (include_path='/home/nginx/domains/pijanitvor.com/public/library:.') in /home/nginx/domains/pijanitvor.com/public/library/Zend/Cache.php on line 208
    [18-Jan-2016 19:59:45 UTC] PHP Warning:  Uncaught ErrorException: require_once(): open_basedir restriction in effect. File(/home/nginx/domains/pijanitvor.com/public/library/Zend/Cache/Exception.php) is not within the allowed path(s): (/home/nginx/domains/shop.pijanitvor.com/public/:/usr/local/lib/php/:/tmp/) in /home/nginx/domains/pijanitvor.com/public/library/Zend/Cache.php:208
    Stack trace:
    #0 /home/nginx/domains/pijanitvor.com/public/library/Zend/Cache.php(208): XenForo_Application::handlePhpError(2, 'require_once():...', '/home/nginx/dom...', 208, Array)
    #1 /home/nginx/domains/pijanitvor.com/public/library/Zend/Cache.php(208): require_once()
    #2 /home/nginx/domains/pijanitvor.com/public/library/Zend/Cache.php(148): Zend_Cache::throwException('file Zend/Cache...')
    #3 /home/nginx/domains/pijanitvor.com/public/library/Zend/Cache.php(94): Zend_Cache::_makeBackend('Redis', Array, false, false)
    #4 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Application.php(761): Zend_Cache::factory('Core', 'Redis', Array, Array)
    #5 /home/nginx/domains/pija in /home/nginx/domains/pijanitvor.com/public/library/Zend/Cache.php on line 208
    [18-Jan-2016 19:59:45 UTC] PHP Fatal error:  Zend_Cache::throwException(): Failed opening required 'Zend/Cache/Exception.php' (include_path='/home/nginx/domains/pijanitvor.com/public/library:.') in /home/nginx/domains/pijanitvor.com/public/library/Zend/Cache.php on line 208

    Code:
    [root@tvor-ocean ~]# tail -10 /usr/local/nginx/logs/error.log
    2016/01/15 08:03:47 [alert] 11061#11061: aborting
    2016/01/15 16:03:48 [alert] 15314#15314: *110540 open socket #55 left in connection 3
    2016/01/15 16:03:48 [alert] 15314#15314: aborting
    2016/01/17 21:16:37 [alert] 20266#20266: *620778 open socket #43 left in connection 147
    2016/01/17 21:16:37 [alert] 20266#20266: *620776 open socket #41 left in connection 168
    2016/01/17 21:16:37 [alert] 20266#20266: *620775 open socket #40 left in connection 174
    2016/01/17 21:16:37 [alert] 20266#20266: aborting
    2016/01/17 22:33:49 [alert] 23095#23095: *18557 open socket #32 left in connection 28
    2016/01/17 22:33:49 [alert] 23095#23095: *18558 open socket #79 left in connection 30
    2016/01/17 22:33:49 [alert] 23095#23095: aborting
    Code:
    [root@tvor-ocean ~]# tail -10 /var/log/php-fpm/www-error.log
    [09-Jan-2016 12:22:34] WARNING: [pool www] server reached pm.max_children setting (8), consider raising it
    [09-Jan-2016 12:22:44] WARNING: [pool www] server reached pm.max_children setting (8), consider raising it
    [09-Jan-2016 12:22:47] WARNING: [pool www] server reached pm.max_children setting (8), consider raising it
    [09-Jan-2016 12:23:17] WARNING: [pool www] server reached pm.max_children setting (8), consider raising it
    [09-Jan-2016 12:23:54] WARNING: [pool www] server reached pm.max_children setting (8), consider raising it
    [09-Jan-2016 12:25:04] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 7 total children
    [09-Jan-2016 12:25:05] WARNING: [pool www] server reached pm.max_children setting (8), consider raising it
    [09-Jan-2016 12:25:10] WARNING: [pool www] server reached pm.max_children setting (8), consider raising it
    [15-Jan-2016 12:10:50] WARNING: [pool phpmyadmin] server reached max_children setting (5), consider raising it
    [18-Jan-2016 16:15:46] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 5 total children
    Code:
    [root@tvor-ocean ~]# tail -200 /var/log/redis/redis.log
    762:M 18 Jan 18:27:05.043 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 18:27:05.048 * Background saving started by pid 3443
    3443:C 18 Jan 18:27:05.083 * DB saved on disk
    3443:C 18 Jan 18:27:05.084 * RDB: 2 MB of memory used by copy-on-write
    762:M 18 Jan 18:27:05.150 * Background saving terminated with success
    762:M 18 Jan 18:32:06.097 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 18:32:06.099 * Background saving started by pid 3502
    3502:C 18 Jan 18:32:06.142 * DB saved on disk
    3502:C 18 Jan 18:32:06.143 * RDB: 2 MB of memory used by copy-on-write
    762:M 18 Jan 18:32:06.200 * Background saving terminated with success
    762:M 18 Jan 18:37:07.041 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 18:37:07.047 * Background saving started by pid 3541
    3541:C 18 Jan 18:37:07.124 * DB saved on disk
    3541:C 18 Jan 18:37:07.125 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 18:37:07.148 * Background saving terminated with success
    762:M 18 Jan 18:42:08.096 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 18:42:08.103 * Background saving started by pid 3592
    3592:C 18 Jan 18:42:08.183 * DB saved on disk
    3592:C 18 Jan 18:42:08.185 * RDB: 2 MB of memory used by copy-on-write
    762:M 18 Jan 18:42:08.203 * Background saving terminated with success
    762:M 18 Jan 18:47:09.035 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 18:47:09.042 * Background saving started by pid 3625
    3625:C 18 Jan 18:47:09.113 * DB saved on disk
    3625:C 18 Jan 18:47:09.114 * RDB: 2 MB of memory used by copy-on-write
    762:M 18 Jan 18:47:09.143 * Background saving terminated with success
    762:M 18 Jan 18:52:10.088 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 18:52:10.098 * Background saving started by pid 3682
    3682:C 18 Jan 18:52:10.185 * DB saved on disk
    3682:C 18 Jan 18:52:10.187 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 18:52:10.198 * Background saving terminated with success
    762:M 18 Jan 18:57:11.017 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 18:57:11.024 * Background saving started by pid 3729
    3729:C 18 Jan 18:57:11.121 * DB saved on disk
    3729:C 18 Jan 18:57:11.122 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 18:57:11.124 * Background saving terminated with success
    762:M 18 Jan 19:00:51.468 * Starting automatic rewriting of AOF on 32428% growth
    762:M 18 Jan 19:00:51.482 * Background append only file rewriting started by pid 3772
    762:M 18 Jan 19:00:51.543 * AOF rewrite child asks to stop sending diffs.
    3772:C 18 Jan 19:00:51.543 * Parent agreed to stop sending diffs. Finalizing AOF...
    3772:C 18 Jan 19:00:51.543 * Concatenating 0.00 MB of AOF diff received from parent.
    3772:C 18 Jan 19:00:51.543 * SYNC append only file rewrite performed
    3772:C 18 Jan 19:00:51.544 * AOF rewrite: 2 MB of memory used by copy-on-write
    762:M 18 Jan 19:00:51.582 * Background AOF rewrite terminated with success
    762:M 18 Jan 19:00:51.582 * Residual parent diff successfully flushed to the rewritten AOF (0.00 MB)
    762:M 18 Jan 19:00:51.583 * Background AOF rewrite finished successfully
    762:M 18 Jan 19:02:12.079 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 19:02:12.086 * Background saving started by pid 3795
    3795:C 18 Jan 19:02:12.189 * DB saved on disk
    3795:C 18 Jan 19:02:12.190 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 19:02:12.290 * Background saving terminated with success
    762:M 18 Jan 19:07:13.027 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 19:07:13.035 * Background saving started by pid 3849
    3849:C 18 Jan 19:07:13.145 * DB saved on disk
    3849:C 18 Jan 19:07:13.146 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 19:07:13.235 * Background saving terminated with success
    762:M 18 Jan 19:12:14.046 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 19:12:14.053 * Background saving started by pid 3901
    3901:C 18 Jan 19:12:14.173 * DB saved on disk
    3901:C 18 Jan 19:12:14.175 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 19:12:14.254 * Background saving terminated with success
    762:M 18 Jan 19:17:15.064 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 19:17:15.067 * Background saving started by pid 3947
    3947:C 18 Jan 19:17:15.188 * DB saved on disk
    3947:C 18 Jan 19:17:15.189 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 19:17:15.268 * Background saving terminated with success
    762:M 18 Jan 19:22:16.004 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 19:22:16.020 * Background saving started by pid 4013
    4013:C 18 Jan 19:22:16.171 * DB saved on disk
    4013:C 18 Jan 19:22:16.172 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 19:22:16.223 * Background saving terminated with success
    762:M 18 Jan 19:27:17.072 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 19:27:17.080 * Background saving started by pid 4059
    4059:C 18 Jan 19:27:17.233 * DB saved on disk
    4059:C 18 Jan 19:27:17.235 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 19:27:17.281 * Background saving terminated with success
    762:M 18 Jan 19:32:18.049 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 19:32:18.054 * Background saving started by pid 4108
    4108:C 18 Jan 19:32:18.197 * DB saved on disk
    4108:C 18 Jan 19:32:18.198 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 19:32:18.255 * Background saving terminated with success
    762:M 18 Jan 19:37:19.033 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 19:37:19.041 * Background saving started by pid 4157
    4157:C 18 Jan 19:37:19.203 * DB saved on disk
    4157:C 18 Jan 19:37:19.204 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 19:37:19.242 * Background saving terminated with success
    762:M 18 Jan 19:42:20.061 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 19:42:20.068 * Background saving started by pid 4226
    4226:C 18 Jan 19:42:20.209 * DB saved on disk
    4226:C 18 Jan 19:42:20.210 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 19:42:20.269 * Background saving terminated with success
    762:M 18 Jan 19:47:21.052 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 19:47:21.056 * Background saving started by pid 4270
    4270:C 18 Jan 19:47:21.207 * DB saved on disk
    4270:C 18 Jan 19:47:21.208 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 19:47:21.257 * Background saving terminated with success
    762:M 18 Jan 19:50:20.202 * Starting automatic rewriting of AOF on 1544% growth
    762:M 18 Jan 19:50:20.210 * Background append only file rewriting started by pid 4300
    762:M 18 Jan 19:50:20.296 * AOF rewrite child asks to stop sending diffs.
    4300:C 18 Jan 19:50:20.296 * Parent agreed to stop sending diffs. Finalizing AOF...
    4300:C 18 Jan 19:50:20.296 * Concatenating 0.00 MB of AOF diff received from parent.
    4300:C 18 Jan 19:50:20.296 * SYNC append only file rewrite performed
    4300:C 18 Jan 19:50:20.297 * AOF rewrite: 2 MB of memory used by copy-on-write
    762:M 18 Jan 19:50:20.310 * Background AOF rewrite terminated with success
    762:M 18 Jan 19:50:20.310 * Residual parent diff successfully flushed to the rewritten AOF (0.00 MB)
    762:M 18 Jan 19:50:20.311 * Background AOF rewrite finished successfully
    762:M 18 Jan 19:52:22.056 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 19:52:22.062 * Background saving started by pid 4322
    4322:C 18 Jan 19:52:22.240 * DB saved on disk
    4322:C 18 Jan 19:52:22.242 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 19:52:22.263 * Background saving terminated with success
    762:M 18 Jan 19:57:23.058 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 19:57:23.067 * Background saving started by pid 4359
    4359:C 18 Jan 19:57:23.233 * DB saved on disk
    4359:C 18 Jan 19:57:23.234 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 19:57:23.267 * Background saving terminated with success
    762:M 18 Jan 20:02:24.035 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 20:02:24.040 * Background saving started by pid 4434
    4434:C 18 Jan 20:02:24.243 * DB saved on disk
    4434:C 18 Jan 20:02:24.245 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 20:02:24.341 * Background saving terminated with success
    762:M 18 Jan 20:07:25.079 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 20:07:25.088 * Background saving started by pid 4473
    4473:C 18 Jan 20:07:25.266 * DB saved on disk
    4473:C 18 Jan 20:07:25.267 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 20:07:25.290 * Background saving terminated with success
    762:M 18 Jan 20:12:26.080 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 20:12:26.088 * Background saving started by pid 4542
    4542:C 18 Jan 20:12:26.321 * DB saved on disk
    4542:C 18 Jan 20:12:26.324 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 20:12:26.390 * Background saving terminated with success
    762:M 18 Jan 20:17:27.098 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 20:17:27.105 * Background saving started by pid 4588
    4588:C 18 Jan 20:17:27.256 * DB saved on disk
    4588:C 18 Jan 20:17:27.258 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 20:17:27.305 * Background saving terminated with success
    762:M 18 Jan 20:22:28.013 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 20:22:28.023 * Background saving started by pid 4627
    4627:C 18 Jan 20:22:28.189 * DB saved on disk
    4627:C 18 Jan 20:22:28.190 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 20:22:28.230 * Background saving terminated with success
    762:M 18 Jan 20:27:29.090 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 20:27:29.101 * Background saving started by pid 4676
    4676:C 18 Jan 20:27:29.271 * DB saved on disk
    4676:C 18 Jan 20:27:29.272 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 20:27:29.314 * Background saving terminated with success
    762:M 18 Jan 20:32:30.078 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 20:32:30.089 * Background saving started by pid 4723
    4723:C 18 Jan 20:32:30.272 * DB saved on disk
    4723:C 18 Jan 20:32:30.273 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 20:32:30.291 * Background saving terminated with success
    762:M 18 Jan 20:37:31.072 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 20:37:31.079 * Background saving started by pid 4767
    4767:C 18 Jan 20:37:31.236 * DB saved on disk
    4767:C 18 Jan 20:37:31.237 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 20:37:31.280 * Background saving terminated with success
    762:M 18 Jan 20:42:32.044 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 20:42:32.051 * Background saving started by pid 4815
    4815:C 18 Jan 20:42:32.212 * DB saved on disk
    4815:C 18 Jan 20:42:32.213 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 20:42:32.252 * Background saving terminated with success
    762:M 18 Jan 20:47:33.063 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 20:47:33.072 * Background saving started by pid 4853
    4853:C 18 Jan 20:47:33.234 * DB saved on disk
    4853:C 18 Jan 20:47:33.235 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 20:47:33.280 * Background saving terminated with success
    762:M 18 Jan 20:49:03.764 * Starting automatic rewriting of AOF on 920% growth
    762:M 18 Jan 20:49:03.771 * Background append only file rewriting started by pid 4867
    762:M 18 Jan 20:49:03.865 * AOF rewrite child asks to stop sending diffs.
    4867:C 18 Jan 20:49:03.866 * Parent agreed to stop sending diffs. Finalizing AOF...
    4867:C 18 Jan 20:49:03.866 * Concatenating 0.00 MB of AOF diff received from parent.
    4867:C 18 Jan 20:49:03.866 * SYNC append only file rewrite performed
    4867:C 18 Jan 20:49:03.867 * AOF rewrite: 2 MB of memory used by copy-on-write
    762:M 18 Jan 20:49:03.873 * Background AOF rewrite terminated with success
    762:M 18 Jan 20:49:03.873 * Residual parent diff successfully flushed to the rewritten AOF (0.00 MB)
    762:M 18 Jan 20:49:03.873 * Background AOF rewrite finished successfully
    762:M 18 Jan 20:52:34.077 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 20:52:34.088 * Background saving started by pid 4911
    4911:C 18 Jan 20:52:34.264 * DB saved on disk
    4911:C 18 Jan 20:52:34.265 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 20:52:34.291 * Background saving terminated with success
    762:M 18 Jan 20:57:35.018 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 20:57:35.027 * Background saving started by pid 4961
    4961:C 18 Jan 20:57:35.211 * DB saved on disk
    4961:C 18 Jan 20:57:35.212 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 20:57:35.227 * Background saving terminated with success
    762:M 18 Jan 21:02:36.100 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 21:02:36.108 * Background saving started by pid 5030
    5030:C 18 Jan 21:02:36.299 * DB saved on disk
    5030:C 18 Jan 21:02:36.300 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 21:02:36.309 * Background saving terminated with success
    762:M 18 Jan 21:07:37.071 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 21:07:37.077 * Background saving started by pid 5088
    5088:C 18 Jan 21:07:37.257 * DB saved on disk
    5088:C 18 Jan 21:07:37.259 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 21:07:37.279 * Background saving terminated with success
    762:M 18 Jan 21:12:38.054 * 10 changes in 300 seconds. Saving...
    762:M 18 Jan 21:12:38.065 * Background saving started by pid 5178
    5178:C 18 Jan 21:12:38.240 * DB saved on disk
    5178:C 18 Jan 21:12:38.241 * RDB: 3 MB of memory used by copy-on-write
    762:M 18 Jan 21:12:38.266 * Background saving terminated with success
    
     
  4. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    12:57 PM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  5. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    4:57 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    It otlined 3 months ago, since I installed centmin and xenforo. So I am confused why is that error shows at all?

    Code:
    [root@tvor-ocean ~]# cat /usr/local/nginx/conf/php.conf
    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass   127.0.0.1:9000;
        #fastcgi_pass   unix:/tmp/php5-fpm.sock;
        fastcgi_index  index.php;
        #fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_param  SCRIPT_FILENAME    $request_filename;
       #fastcgi_param PHP_ADMIN_VALUE open_basedir=$document_root/:/usr/local/lib/php/:/tmp/;
    
    # might shave 200+ ms off PHP requests
    # which don't pass on a content length header
    # slightly faster page response time at the
    # expense of throughput / scalability
    #sendfile on;
    #tcp_nopush off;
    #keepalive_requests 0;
    
    fastcgi_connect_timeout 120;
    fastcgi_send_timeout 360;
    fastcgi_read_timeout 360;
    fastcgi_buffer_size 512k;
    fastcgi_buffers 512 16k;
    fastcgi_busy_buffers_size 1m;
    fastcgi_temp_file_write_size 4m;
    fastcgi_max_temp_file_size 4m;
    fastcgi_intercept_errors on;
    
    # next 3 lines when uncommented / enabled
    # allow Nginx to handle uploads which then
    # passes back the completed upload to PHP
    #fastcgi_pass_request_body off;
    #client_body_in_file_only clean;
    #fastcgi_param  REQUEST_BODY_FILE  $request_body_file;
    
    #new .04+ map method
    fastcgi_param HTTPS $server_https;
    
    # comment out PATH_TRANSLATED line if /usr/local/lib/php.ini sets following:
    # cgi.fix_pathinfo=0
    # as of centminmod v1.2.3-eva2000.01 default is set to cgi.fix_pathinfo=1
    
    fastcgi_param  PATH_INFO          $fastcgi_path_info;
    fastcgi_param  PATH_TRANSLATED    $document_root$fastcgi_path_info;
    
    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;
    
    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  REQUEST_URI        $request_uri;
    fastcgi_param  DOCUMENT_URI       $document_uri;
    fastcgi_param  DOCUMENT_ROOT      $document_root;
    fastcgi_param  SERVER_PROTOCOL    $server_protocol;
    fastcgi_param  REQUEST_SCHEME     $scheme;
    fastcgi_param  HTTPS              $https if_not_empty;
    
    fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;
    
    fastcgi_param  REMOTE_ADDR        $remote_addr;
    fastcgi_param  REMOTE_PORT        $remote_port;
    fastcgi_param  SERVER_ADDR        $server_addr;
    fastcgi_param  SERVER_PORT        $server_port;
    fastcgi_param  SERVER_NAME        $server_name;
    
    # Set php-fpm geoip variables
    fastcgi_param GEOIP_COUNTRY_CODE $geoip_country_code;
    fastcgi_param GEOIP_COUNTRY_CODE3 $geoip_country_code3;
    fastcgi_param GEOIP_COUNTRY_NAME $geoip_country_name;
    fastcgi_param GEOIP_CITY_COUNTRY_CODE $geoip_city_country_code;
    fastcgi_param GEOIP_CITY_COUNTRY_CODE3 $geoip_city_country_code3;
    fastcgi_param GEOIP_CITY_COUNTRY_NAME $geoip_city_country_name;
    fastcgi_param GEOIP_REGION $geoip_region;
    fastcgi_param GEOIP_CITY $geoip_city;
    fastcgi_param GEOIP_POSTAL_CODE $geoip_postal_code;
    fastcgi_param GEOIP_CITY_CONTINENT_CODE $geoip_city_continent_code;
    fastcgi_param GEOIP_LATITUDE $geoip_latitude;
    fastcgi_param GEOIP_LONGITUDE $geoip_longitude;
    
    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param  REDIRECT_STATUS    200;
    
                       }
     
  6. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    12:57 PM
    Nginx 1.13.x
    MariaDB 5.5
    different document roots

    doing line breaks so you can see

    Code:
    open_basedir restriction in effect. 
    File(/home/nginx/domains/pijanitvor.com/public/library/Zend/Cache/Exception.php) 
    is not within the allowed path(s): 
    (/home/nginx/domains/shop.pijanitvor.com/public/:/usr/local/lib/php/:/tmp/)
    open_basedir restricts each vhost to their respective doc roots which for your vhost is /home/nginx/domains/shop.pijanitvor.com/public/ but your xenforo install is trying to access a different document root at /home/nginx/domains/pijanitvor.com/public

    you may have setup a custom php.conf include file somewhere in a location match ? what does these commands output for you ?
    find all files which have the open_basedir setting in it
    Code:
    grep -Rno 'PHP_ADMIN_VALUE open_basedir' /usr/local/nginx/conf/*
    i.e.
    Code:
    grep -Rno 'PHP_ADMIN_VALUE open_basedir' /usr/local/nginx/conf/*
    /usr/local/nginx/conf/php-pool2.conf:9:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/php-pool3.conf:9:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/php-pool4.conf:9:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/php-pool5.conf:9:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/php.conf:9:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/phpalt.conf:11:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/phpssl.conf:9:PHP_ADMIN_VALUE open_basedir
    then find all the files with those php include files (which have open_basedir setting) contained within them

    Code:
    for f in $(grep -R 'PHP_ADMIN_VALUE open_basedir' /usr/local/nginx/conf/* | awk -F ":" '{print $1}' | uniq); do grep -R "$f" /usr/local/nginx/conf/*; done
    i.e.
    Code:
    for f in $(grep -R 'PHP_ADMIN_VALUE open_basedir' /usr/local/nginx/conf/* | awk -F ":" '{print $1}' | uniq); do grep -R "$f" /usr/local/nginx/conf/*; done
    /usr/local/nginx/conf/conf.d/ssl.conf:#include /usr/local/nginx/conf/php.conf;
    /usr/local/nginx/conf/conf.d/virtual.conf:include /usr/local/nginx/conf/php.conf;
    /usr/local/nginx/conf/conf.d/demodomain.com.conf:include /usr/local/nginx/conf/php.conf;
    /usr/local/nginx/conf/include_opcache.conf:    include /usr/local/nginx/conf/php.conf;
     
    • Friendly Friendly x 1
  7. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    4:57 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    Code:
    [root@tvor-ocean ~]# grep -Rno 'PHP_ADMIN_VALUE open_basedir' /usr/local/nginx/conf/*
    /usr/local/nginx/conf/php_32092_mysqladmin10551.conf:9:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/phpalt.conf:11:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/php.conf:9:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/php.conf-oldversion_271115-033231:9:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/php.conf-oldversion_301015-233549:9:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/php-pool2.conf:9:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/php-pool3.conf:9:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/php-pool4.conf:9:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/php-pool5.conf:9:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/php-rediscache.conf:19:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/phpssl.conf:9:PHP_ADMIN_VALUE open_basedir
    /usr/local/nginx/conf/php-wpsc.conf:9:PHP_ADMIN_VALUE open_basedir
    Code:
    [root@tvor-ocean ~]# for f in $(grep -R 'PHP_ADMIN_VALUE open_basedir' /usr/local/nginx/conf/* | awk -F ":" '{print $1}' | uniq); do grep -R "$f" /usr/local/nginx/conf/*; done
    /usr/local/nginx/conf/phpmyadmin_https.conf:    include /usr/local/nginx/conf/php_32092_mysqladmin10551.conf;
    /usr/local/nginx/conf/conf.d/pijanitvor.com.conf-disabled:    include /usr/local/nginx/conf/php.conf;
    /usr/local/nginx/conf/conf.d/virtual.conf:include /usr/local/nginx/conf/php.con;
    /usr/local/nginx/conf/conf.d/pijanitvor.com.ssl.conf:  include /usr/local/nginx/conf/php.conf;
    /usr/local/nginx/conf/conf.d/phpmyadmin_ssl.conf:  #include /usr/local/nginx/conf/php.conf;
    /usr/local/nginx/conf/conf.d/ssl.conf:#include /usr/local/nginx/conf/php.conf;
    /usr/local/nginx/conf/conf.d/demodomain.com.conf:include /usr/local/nginx/conf/php.conf;
    /usr/local/nginx/conf/include_opcache.conf:    include /usr/local/nginx/conf/php.conf;
    /usr/local/nginx/conf/conf.d/shop.pijanitvor.com.conf-disabled:    include /usr/local/nginx/conf/php-rediscache.conf;
    /usr/local/nginx/conf/conf.d/shop.pijanitvor.com.conf-disabled:    include /usr/local/nginx/conf/php-rediscache.conf;
    /usr/local/nginx/conf/conf.d/shop.pijanitvor.com.conf-disabled:  include /usr/local/nginx/conf/php-rediscache.conf;
    /usr/local/nginx/conf/conf.d/shop.pijanitvor.com.ssl.conf:    include /usr/local/nginx/conf/php-rediscache.conf;
    /usr/local/nginx/conf/conf.d/shop.pijanitvor.com.ssl.conf:    include /usr/local/nginx/conf/php-rediscache.conf;
    /usr/local/nginx/conf/conf.d/shop.pijanitvor.com.ssl.conf:  include /usr/local/nginx/conf/php-rediscache.conf;
    /usr/local/nginx/conf/conf.d/shop.pijanitvor.com.conf-disabled:    #include /usr/local/nginx/conf/php-wpsc.conf;
    /usr/local/nginx/conf/conf.d/shop.pijanitvor.com.conf-disabled:    #include /usr/local/nginx/conf/php-wpsc.conf;
    /usr/local/nginx/conf/conf.d/shop.pijanitvor.com.conf-disabled:  #include /usr/local/nginx/conf/php-wpsc.conf;
    /usr/local/nginx/conf/conf.d/shop.pijanitvor.com.ssl.conf:    #include /usr/local/nginx/conf/php-wpsc.conf;
    /usr/local/nginx/conf/conf.d/shop.pijanitvor.com.ssl.conf:    #include /usr/local/nginx/conf/php-wpsc.conf;
    /usr/local/nginx/conf/conf.d/shop.pijanitvor.com.ssl.conf:  #include /usr/local/nginx/conf/php-wpsc.conf;
     
  8. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    12:57 PM
    Nginx 1.13.x
    MariaDB 5.5
    /usr/local/nginx/conf/php-rediscache.conf has a openbase_dir restriction too so might want to comment it out there too although no idea why your xenforo install is trying reach into your wordpress install on shop. subdomain
     
    • Friendly Friendly x 1
  9. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    12:57 PM
    Nginx 1.13.x
    MariaDB 5.5
    also you can check all vhost files and see all references to document root settings to see if any are out of place

    for pijanitvor.com
    Code:
    grep -Rn 'root.*\/home\/nginx\/domains\/pijanitvor.com' /usr/local/nginx/conf/conf.d/*
    for shop.pijanitvor.com
    Code:
    grep -Rn 'root.*\/home\/nginx\/domains\/shop.pijanitvor.com' /usr/local/nginx/conf/conf.d/*
     
    • Friendly Friendly x 1
  10. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    4:57 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    Done

    If you do not know, how would I know :cry:


    Code:
    [root@tvor-ocean ~]# grep -Rn 'root.*\/home\/nginx\/domains\/pijanitvor.com' /usr/local/nginx/conf/conf.d/*
    /usr/local/nginx/conf/conf.d/pijanitvor.com.conf-disabled:13:    root /home/nginx/domains/pijanitvor.com/public;
    /usr/local/nginx/conf/conf.d/pijanitvor.com.ssl.conf:52:  root /home/nginx/domains/pijanitvor.com/public;
    Code:
    [root@tvor-ocean ~]# grep -Rn 'root.*\/home\/nginx\/domains\/shop.pijanitvor.com' /usr/local/nginx/conf/conf.d/*
    /usr/local/nginx/conf/conf.d/shop.pijanitvor.com.conf-disabled:28:  root /home/nginx/domains/shop.pijanitvor.com/public;
    /usr/local/nginx/conf/conf.d/shop.pijanitvor.com.ssl.conf:58:  root /home/nginx/domains/shop.pijanitvor.com/public;

    Should I reverse changes for redis cache for wordpress and setup again old cache - Cache Enabler?
     
  11. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    12:57 PM
    Nginx 1.13.x
    MariaDB 5.5
    looks okay there.. you should just let the change you made to https://community.centminmod.com/posts/24440/ run a few hours to see if the error pops up again

    and for good measure restart both nginx and php-fpm as the openbase_dir while is a php setting, it's implemented at nginx level
    Code:
    nprestart
    and maybe flush redis cache and restart redis
    Code:
    redis-cli flushall
    service redis restart
     
    • Like Like x 1
  12. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    4:57 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    Any thoughts about this? Is it Redis the one that could be clash
     
  13. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    12:57 PM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 2
  14. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    12:57 PM
    Nginx 1.13.x
    MariaDB 5.5
    on and simple check to make sure redis server is actually running !
    Code:
    service redis status
     
    • Like Like x 1
  15. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    4:57 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    Code:
    [root@tvor-ocean ~]# service redis status -l
    Redirecting to /bin/systemctl status  -l redis.service
    â—Ź redis.service - Redis persistent key-value database
       Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
      Drop-In: /etc/systemd/system/redis.service.d
               └─limit.conf
       Active: active (running) since Mon 2016-01-18 16:15:38 CET; 6h ago
    Main PID: 762 (redis-server)
       CGroup: /system.slice/redis.service
               └─762 /usr/bin/redis-server 127.0.0.1:6379             
    
    Jan 18 16:15:38 tvor-ocean.pijanitvor.com systemd[1]: Started Redis persistent key-value database.
    Jan 18 16:15:38 tvor-ocean.pijanitvor.com systemd[1]: Starting Redis persistent key-value database...
    Flushed redis, restarted redis, restarted nginx + php-fpm

    Running again code for redis:
    Code:
    [root@tvor-ocean ~]# service redis status -l
    Redirecting to /bin/systemctl status  -l redis.service
    â—Ź redis.service - Redis persistent key-value database
       Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
      Drop-In: /etc/systemd/system/redis.service.d
               └─limit.conf
       Active: active (running) since Mon 2016-01-18 23:13:58 CET; 2min 29s ago
      Process: 7111 ExecStop=/usr/bin/redis-shutdown (code=exited, status=0/SUCCESS)
    Main PID: 7120 (redis-server)
       CGroup: /system.slice/redis.service
               └─7120 /usr/bin/redis-server 127.0.0.1:6379              
    
    Jan 18 23:13:58 tvor-ocean.pijanitvor.com systemd[1]: Started Redis persistent key-value database.
    Jan 18 23:13:58 tvor-ocean.pijanitvor.com systemd[1]: Starting Redis persistent key-value database...
     
  16. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    4:57 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    Hmmm. Redis log

    Code:
    [root@tvor-ocean ~]# tail -10 /var/log/redis/redis.log
    7120:M 18 Jan 23:13:58.941 # Server started, Redis version 3.0.5
    7120:M 18 Jan 23:13:58.941 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
    7120:M 18 Jan 23:13:59.172 * DB saved on disk
    7120:M 18 Jan 23:13:59.176 * DB loaded from append only file: 0.236 seconds
    7120:M 18 Jan 23:13:59.176 * The server is now ready to accept connections on port 6379
    7120:M 18 Jan 23:15:00.020 * 10000 changes in 60 seconds. Saving...
    7120:M 18 Jan 23:15:00.027 * Background saving started by pid 7200
    7200:C 18 Jan 23:15:00.041 * DB saved on disk
    7200:C 18 Jan 23:15:00.042 * RDB: 3 MB of memory used by copy-on-write
    7120:M 18 Jan 23:15:00.128 * Background saving terminated with success
     
  17. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    12:57 PM
    Nginx 1.13.x
    MariaDB 5.5
    looks good for redis just you need to disable transparent huge pages but that doesn't cause your problems just another unrelated matter

    when you run php upgrade and have zend opcache installed/select yes it should auto detect when redis is installed and auto disable transparent huge pages see code at centminmod/zendopcache_tweaks.inc at 123.09beta01 · centminmod/centminmod · GitHub unless you installed redis after php upgrade which then won't detect such

    you can use a standalone tools/hptweaks.sh in centmin mod 123.09beta01 to manually disable such or just manually via command
    Code:
    echo never > /sys/kernel/mm/transparent_hugepage/enabled
    then ensure after reboot it's disabled too
    Code:
    echo "echo never > /sys/kernel/mm/transparent_hugepage/enabled" >> /etc/rc.local
     
    • Like Like x 1
    • Informative Informative x 1
  18. Xon

    Xon Active Member

    125
    56
    28
    Nov 16, 2015
    Ratings:
    +162
    Local Time:
    10:57 AM
    1.11.x
    MariaDB 10.1.x
    Correct. XF actually prefixes all it's IDs before they hit the caching layer too.
     
    • Informative Informative x 2
  19. eva2000

    eva2000 Administrator Staff Member

    29,051
    6,593
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,789
    Local Time:
    12:57 PM
    Nginx 1.13.x
    MariaDB 5.5
    thought as much :)
     
  20. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +161
    Local Time:
    10:57 AM
    latest
    latest
    In here - https://community.centminmod.com/posts/18828/ there is a section titled "Switch from WP Super Cache to Nginx Level Redis Cache"

    Why is it that you had to switch between the two if it works fine together?