Learn about Centmin Mod LEMP Stack today
Become a Member

502 bad gateway related to geo ip

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by pamamolf, Sep 29, 2016.

  1. pamamolf

    pamamolf Well-Known Member

    2,720
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    6:07 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Hi

    I member of the forum was getting some random 502 bad gateway errors and i thought that something was wrong with my php and in general i check also nginx and mariadb and all was ok as didn't hit any limit and in general the forum has a very low traffic as much as 50 users online ......

    I was not able to reproduce it on my end and then i enable a vpn on users country location and i had that issue randomly by clicking about 10 times i got that error about 5 times....

    I know that you will recommend me to enable php debugging but that seems very specific to Geo ip......Maybe Cloudflare can be the issue?Or php Geo location module or Nginx related settings?

    Any ideas?

    Thanks
     
  2. pamamolf

    pamamolf Well-Known Member

    2,720
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    6:07 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Let's find that hard bug :)

    Checking on my logs i can see that started at 13 of September and that day i was just update Nginx to latest version...

    Don't know if that helps and have an idea now where to look at....

    Downgrading and checking now....
     
  3. eva2000

    eva2000 Administrator Staff Member

    30,151
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    1:07 AM
    Nginx 1.13.x
    MariaDB 5.5
  4. pamamolf

    pamamolf Well-Known Member

    2,720
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    6:07 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    I am not getting cloudflare-nginx .....

    Reverting Nginx didn't help....

    Reverting php now.....
     
  5. pamamolf

    pamamolf Well-Known Member

    2,720
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    6:07 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Php revert didn't help :(

    error log info:

     
  6. pamamolf

    pamamolf Well-Known Member

    2,720
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    6:07 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Final results :)

    The specific link that doesn't work:

    Code:
    http://www.domain.com/index.php?app=core&module=usercp
    works great when i use the https version of the site:

    Code:
    https://www.domain.com/index.php?app=core&module=usercp
    Don't know what could be the problem .....

    Nothing different on both vhosts config files...
     
    Last edited: Sep 29, 2016
  7. jeffwidman

    jeffwidman Active Member

    152
    27
    28
    Dec 3, 2014
    Ratings:
    +51
    Local Time:
    8:07 AM
    Did you ever figure this out?
     
  8. pamamolf

    pamamolf Well-Known Member

    2,720
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    6:07 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Nope :(