Discover Centmin Mod today
Register Now

Sysadmin 503 error please advise

Discussion in 'System Administration' started by ahmed, Jun 10, 2017.

  1. ahmed

    ahmed Member

    201
    15
    18
    Feb 21, 2017
    Ratings:
    +21
    Local Time:
    7:21 PM
    Hello
    I have one of my resources on a webpage dosn't load

    Code (Text):
    [LIST]
    [LIST]
    [*][B]Request URL:[/B]https://domain.com/courses/coursename/lessons/welcome/?content-item-only=yes
    [*][B]Request Method:[/B]GET
    [*][B]Status Code:[/B]503 
    [*][B]Remote Address:[/B]1.1.1.1:443
    [*][B]Referrer Policy:[/B]no-referrer-when-downgrade
    [/LIST]
    [*][B]Response Headers[/B]
    [LIST]
    [*][B]content-length:[/B]0
    [*][B]date:[/B]Fri, 09 Jun 2017 23:43:05 GMT
    [*][B]server:[/B]nginx
    [*][B]status:[/B]503
    [*][B]x-content-type-options:[/B]nosniff
    [*][B]x-varnish:[/B]5
    [*][B]x-xss-protection:[/B]1; mode=block
    [/LIST]
    [*][B]Request Headers[/B]
    [LIST]
    [*][B]:authority:[/B]domain.com
    [*][B]:method:[/B]GET
    [*][B]:path:[/B]/courses/coursename/lessons/welcome/?content-item-only=yes
    [*][B]:scheme:[/B]https
    [*][B]accept:[/B]text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
    [*][B]accept-encoding:[/B]gzip, deflate, br
    [*][B]accept-language:[/B]en-US,en;q=0.8,ar;q=0.6
    [*][B]cookie:[/B]_ym_uid=149709851618ws331606615; _ym_isad=2; _ym_visorc_4352009644=w; __stripe_mid=b1e4wsd043-f681-48cd-baae-769f425fce44; __stripe_sid=fcd5w2d72c-3851-483a-8b54-afd9093ew8a8dadf
    [*][B]referer:[/B]https://domain.com/courses/coursename/lessons/welcome/
    [*][B]upgrade-insecure-requests:[/B]1
    [*][B]user-agent:[/B]Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Mobile Safari/537.36
    [/LIST]
    [*][B]Query String Parameters[/B]view source
    view URL encoded
    [LIST]
    [*][B]content-item-only:[/B]yes
    [/LIST]
    [/LIST]
    


    please advise where to dig?
     
  2. ahmed

    ahmed Member

    201
    15
    18
    Feb 21, 2017
    Ratings:
    +21
    Local Time:
    7:21 PM
    sometimes also it gives me error 500 for that specifc request, otherewise the whole website is just fine
     
  3. ahmed

    ahmed Member

    201
    15
    18
    Feb 21, 2017
    Ratings:
    +21
    Local Time:
    7:21 PM
    I was able to isolate the problem and it ONLY happens when the WordPress theme updates to the newest version, interestingly even if I pick another theme (e.g twenty seven) the problem persists [but this time is with loops while loading this specific page], the theme company claims that it is a server issue? I went thru the Nginx wp-secure and disabled it altogether, still there? any ideas?
     
    Last edited: Jun 16, 2017
  4. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    3:21 AM
    Nginx 1.13.x
    MariaDB 5.5
    does it happen of wp plugin updates ?
     
  5. ahmed

    ahmed Member

    201
    15
    18
    Feb 21, 2017
    Ratings:
    +21
    Local Time:
    7:21 PM
    no, it only happens with that specific theme update
     
  6. ahmed

    ahmed Member

    201
    15
    18
    Feb 21, 2017
    Ratings:
    +21
    Local Time:
    7:21 PM
    one of the new thing added in the updated theme version is comments (to the lesson page that have the troubles), I'm using Facebook comments plugin, does this have anything to do with that?
     
  7. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    3:21 AM
    Nginx 1.13.x
    MariaDB 5.5
  8. ahmed

    ahmed Member

    201
    15
    18
    Feb 21, 2017
    Ratings:
    +21
    Local Time:
    7:21 PM
    it is not the maintenance as it only happens on a specific ajax loaded page,

    thanks for the tip though :)

    I tried one more time and the twenty-fifteen theme fixed the problem, that means it is in the theme update, what is the best practice for a company with poor themes like this, shall i make staging server to test before updating, shall I disable the auto-update for the theme only???
     
  9. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    3:21 AM
    Nginx 1.13.x
    MariaDB 5.5
    oh if it's the theme itself then only way is to have staging cloned test server to test updates - hmm haven't looked into whether you can set a specific date or delay auto updates in wordpress i.e. staging regular auto update vs live delayed by 24hrs auto update
     
    • Like Like x 1
  10. ahmed

    ahmed Member

    201
    15
    18
    Feb 21, 2017
    Ratings:
    +21
    Local Time:
    7:21 PM
  11. ahmed

    ahmed Member

    201
    15
    18
    Feb 21, 2017
    Ratings:
    +21
    Local Time:
    7:21 PM
  12. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    3:21 AM
    Nginx 1.13.x
    MariaDB 5.5
    yes many tools out there to clone sites just search or just do it manually via wp-cli https://developer.wordpress.org/cli/commands/

    i.e. if wordpress installed via centmin.sh menu option 22 at /home/nginx/domains/domain.com/public web root

    backup database + tar compress files in web root and under to /home/nginx/domains/domain.com/backup
    Code (Text):
    cd /home/nginx/domains/domain.com/public
    wp db export ../backup/wpdb-backup.sql
    tar -cvzf ../backup/wpfiles.tar.gz .
    

    Code (Text):
    ls -lah /home/nginx/domains/domain.com/backup 
    total 8.2M
    drwxr-s--- 2 nginx nginx   49 Jun 17 00:34 .
    drwxr-s--- 7 nginx nginx  116 Jun 17 00:35 ..
    -rw-r--r-- 1 root  nginx  43K Jun 17 00:34 wpdb-backup.sql
    -rw-r--r-- 1 root  nginx 8.1M Jun 17 00:34 wpfiles.tar.gz
    

    Then create a 2nd empty mysql database + update cloned wp-config.php databasename and user/pass and restore sql backup file and tar extract files into clone site's web root /home/nginx/domains/copydomain.com/public

    then update cloned site database's siteurl and home settings as per https://community.centminmod.com/th...how-to-switch-wordpress-to-subdirectory.5603/

    so to change database references from domain.com to copydomain.com on cloned web root installed copy at /home/nginx/domains/copydomain.com/public
    Code (Text):
    cd /home/nginx/domains/copydomain.com/public
    wp option update home 'http://copydomain.com' --allow-root
    wp option update siteurl 'http://copydomain.com' --allow-root
    wp option get siteurl --allow-root
    wp option get home --allow-root
    wp search-replace 'http://domain.com' 'http://copydomain.com' --skip-columns=guid --allow-root