Welcome to Centmin Mod Community
Register Now

502 bad gateway related to geo ip

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

  1. pamamolf

    pamamolf Premium Member Premium Member

    4,084
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    2:32 PM
    Nginx-1.25.x
    MariaDB 10.3.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 Premium Member Premium Member

    4,084
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    2:32 PM
    Nginx-1.25.x
    MariaDB 10.3.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

    54,523
    12,211
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,780
    Local Time:
    10:32 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  4. pamamolf

    pamamolf Premium Member Premium Member

    4,084
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    2:32 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    I am not getting cloudflare-nginx .....

    Reverting Nginx didn't help....

    Reverting php now.....
     
  5. pamamolf

    pamamolf Premium Member Premium Member

    4,084
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    2:32 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    Php revert didn't help :(

    error log info:

     
  6. pamamolf

    pamamolf Premium Member Premium Member

    4,084
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    2:32 PM
    Nginx-1.25.x
    MariaDB 10.3.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:
    4:32 AM
    Did you ever figure this out?
     
  8. pamamolf

    pamamolf Premium Member Premium Member

    4,084
    428
    83
    May 31, 2014
    Ratings:
    +834
    Local Time:
    2:32 PM
    Nginx-1.25.x
    MariaDB 10.3.x
    Nope :(