Problem with admincp and Nginx

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mickie D
    Senior Member
    • Jan 2003
    • 128
    • 4.2.X

    [Forum] Problem with admincp and Nginx

    Hi there my site is working, except the admincp, which is really strange?

    First off I have just moved servers to a higher spec machine, which I uses (VB4.2 PL3) Nginx, php-fpm, xcache.
    Previous machine has exactly the same OS/and configuration.

    The Problem:
    Well if I go to the admincp I get a blank page, however if I go into the modcp then into admincp it works fine?

    Error from Nginx
    Code:
    2013/01/24 12:46:05 [error] 9170#0: *403853 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xx.xx.xx.xx, server: www.digitalworldz.co.uk, request: "POST /login.php?do=login HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.digitalworldz.co.uk", referrer: "http://www.digitalworldz.co.uk/XXXXXX/index.php"
    But the site functions fine?

    Except the admin site, unless I login to modcp.

    OTHER NOTES:
    I have turned off all modifications via includes/config.php, removed the VBSEO code from the conf files, restarted and cleared all cache.

    But the page still is blank unless I visit it via the modcp first ?

    Thank you.
    Mick
    Digitalworldz - Satellite and Cable Forum
  • Mickie D
    Senior Member
    • Jan 2003
    • 128
    • 4.2.X

    #2
    This code in the config.php fixes this error, however it's not something I want to implement!!!

    ini_set('memory_limit', -1);

    But however in my php.ini file my setting is

    memory_limit = 130M

    Surely that is enough?

    I have 46GB Ram, so I am not worried, my site is cached to the eyeballs and only uses 15GB of ram on 3 million posts.

    However should good practice here not be kept into perspective, scripts consuming more than 130MB ???

    And on another NOTE:
    Why would it go allow me to login via the modcp then... it's ok into the admincp, fishy!

    Mick
    Last edited by Mickie D; Fri 25 Jan '13, 4:46am.
    Digitalworldz - Satellite and Cable Forum

    Comment

    • TheLastSuperman
      Senior Member
      • Sep 2008
      • 1799

      #3
      Have you tried editing my.cnf?

      Edit your my.cnf file and check to see what the wait_timeout variable is set to, is it 28800 which is 8 hours... sometimes a host will have it set to 10secs when the default is 8 hours i.e. 28800 seconds. You can view your my.cnf file when logged in as the root user, edit and save then re-upload and restart mysql.

      Edit: Although on a side note, while the default is 8 hours if you don't have anything truly requiring it to be that then read this - http://serverfault.com/questions/355...en-connections


      Former vBulletin Support Staff
      Hacked recently? See my blog post "Recovering a Hacked vBulletin Site".
      Thinking outside the box? Need modification support? Visit www.vBulletin.org and have at it!

      Comment

      • Mickie D
        Senior Member
        • Jan 2003
        • 128
        • 4.2.X

        #4
        Hi Michael,

        It is set to 20 seconds ?

        Would this be bad then ?

        Mick

        - - - Updated - - -

        Here is the my.cnf

        Code:
        [mysqld]
        bind-address=127.0.0.1
        # optimized my.cnf for MariaDB 5.2.12
        # by eva2000
        # vbtechsupport.com
        
        # 5.2.10
        #thread-handling = pool-of-threads
        #thread-pool-size= 20
        #mysql --port=3307 --protocol=tcp
        #extra-port=3307
        #extra-max-connections=1
        #tmpdir=/home/mysqltmp
        
        
        skip-innodb
        skip-federated
        skip-pbxt
        skip-pbxt_statistics
        skip-archive
        #skip-name-resolve
        #old_passwords
        back_log = 75
        max_connections = 400
        key_buffer_size = 2048M
        myisam_sort_buffer_size = 128M
        myisam_max_sort_file_size = 2048M
        join_buffer_size = 228K
        read_buffer_size = 228K
        sort_buffer_size = 356K
        table_definition_cache = 4096
        table_open_cache = 2048
        thread_cache_size = 64
        wait_timeout = 20
        connect_timeout = 10
        tmp_table_size = 32M
        max_heap_table_size = 32M
        max_allowed_packet = 32M
        max_seeks_for_key = 1000
        group_concat_max_len = 1024
        max_length_for_sort_data = 1024
        net_buffer_length = 16384
        max_connect_errors = 100000
        concurrent_insert = 2
        read_rnd_buffer_size = 256K
        bulk_insert_buffer_size = 8M
        query_cache_limit = 512K
        query_cache_size = 90M
        query_cache_type = 1
        query_cache_min_res_unit = 2K
        query_prealloc_size = 262144
        query_alloc_block_size = 65536
        transaction_alloc_block_size = 8192
        transaction_prealloc_size = 4096
        default-storage-engine = MyISAM
        #max_write_lock_count = 8
        
        log_warnings=1
        slow_query_log=0
        long_query_time=1
        slow_query_log_file=/var/lib/mysql/slowq.log
        log-error
        
        # mariadb settings
        userstat = 0
        key_cache_segments = 1
        aria_group_commit = none
        aria_group_commit_interval = 0
        aria_log_file_size = 32M
        aria_log_purge_type = immediate
        aria_pagecache_buffer_size = 8M
        aria_sort_buffer_size = 8M
        
        #mariadb innodb
        innodb_stats_update_need_lock = 0
        innodb_extra_rsegments = 4
        innodb_use_purge_thread = 4
        innodb_log_block_size = 512
        innodb_flush_neighbor_pages = 1
        
        # innodb settings
        innodb_read_ahead = none
        innodb_file_per_table = 1
        innodb_open_files = 1000
        innodb_data_file_path= ibdata1:2G:autoextend
        innodb_buffer_pool_size = 2048M
        innodb_additional_mem_pool_size = 32M
        
        innodb_log_files_in_group = 2
        innodb_log_file_size = 64M
        innodb_log_buffer_size = 8M
        innodb_flush_log_at_trx_commit = 2
        innodb_thread_concurrency = 0
        innodb_lock_wait_timeout=50
        innodb_flush_method = O_DIRECT
        innodb_support_xa=1
        
        # 200 * # DISKS
        innodb_io_capacity = 100
        innodb_read_io_threads = 2
        innodb_write_io_threads = 2
        
        [mysqld_safe]
        log-error=/var/log/mysqld.log
        #nice = -5
        open-files-limit = 8192
        
        [mysqldump]
        quick
        max_allowed_packet = 32M
        
        [myisamchk]
        key_buffer = 32M
        sort_buffer = 16M
        read_buffer = 16M
        write_buffer = 16M
        
        [mysqlhotcopy]
        interactive-timeout = 20
        Thanks very much for your reply

        Mick
        Digitalworldz - Satellite and Cable Forum

        Comment

        • TheLastSuperman
          Senior Member
          • Sep 2008
          • 1799

          #5
          For now set it to the default of 28800, then test. If that works you can always decrease the value (or lower back down and increase until it functions properly) however I see George has optimized your site so I'm fairly positive he took that into account when doing so... there could still be soemthing else causing this, the wait_timeout was my initial thought however.

          Are you 100% sure your site is secure? No recent issues etc?


          Former vBulletin Support Staff
          Hacked recently? See my blog post "Recovering a Hacked vBulletin Site".
          Thinking outside the box? Need modification support? Visit www.vBulletin.org and have at it!

          Comment

          • Mickie D
            Senior Member
            • Jan 2003
            • 128
            • 4.2.X

            #6
            As sure as I could be about the site being secure. We all know that good enough hackers if they want in, they will get in!

            George has not optimized it, this script is generated by centmin (I have been using centmin for quite some time now).

            I have been using the mysqltuner to optimize it myself, so this could of affected it... but I do not remember editing the time wait???

            Thank you Michael,

            Could you just help me make the link between the My.cnf time outs and the max_memory in the php.ini?

            Mick
            Last edited by Mickie D; Fri 25 Jan '13, 7:12am.
            Digitalworldz - Satellite and Cable Forum

            Comment

            • TheLastSuperman
              Senior Member
              • Sep 2008
              • 1799

              #7
              Well I initially though perhaps something in your admincp i.e. a mod menu or some type of newly added functionality may have cause it to time out, the modcp does not share the same.. well items and functionality as the admincp, while similar they still differ as one is for simple moderators w/ basic settings etc and the other is the entire back-end for the site owner/admins.

              I bet it's simply something in regards to the admincp.

              If you've made any recent changes in the last 2-3 days please revert them then test to see if you can login, if not then please open a support ticket w/ Attn: Mike Miller as part of the title, in the sensitive data field I'll need ftp login info (for now just basic ftp access to forum files/folders etc as I'm now thinking it might be something else dealing w/ only the admincp index per say) and admincp login info to check this out for you.

              Sincerely,
              Mike
              Last edited by TheLastSuperman; Fri 25 Jan '13, 7:44am. Reason: OMG spelling rofl!


              Former vBulletin Support Staff
              Hacked recently? See my blog post "Recovering a Hacked vBulletin Site".
              Thinking outside the box? Need modification support? Visit www.vBulletin.org and have at it!

              Comment

              • Mickie D
                Senior Member
                • Jan 2003
                • 128
                • 4.2.X

                #8
                Cheers Michael.

                I have not edited the admincp, in fact when this happened I re-installed all the vbulletin files and patches to latest vb4.2 pl3.

                I do not think there is any issues with the admincp myself... I thought it was token issues at first because the login from modcp allowed the login to admincp???

                But when I tried the memory_limit, I found that a limit of 150MB allowed me access to the admincp?

                And also on the previous server the limit was 90MB with no issues... however centmin is now the latest... so I am guessing some changes in php5-fpm and nginx (in the newest versions) vary.

                I am going to experiment with the my.cnf and the php.ini in a minute see if this is causing the issues.

                Really appreciate your help!

                Mick
                Digitalworldz - Satellite and Cable Forum

                Comment

                • George L
                  Former vBulletin Support
                  • May 2000
                  • 32996
                  • 3.8.x

                  #9
                  Originally posted by Mickie D
                  As sure as I could be about the site being secure. We all know that good enough hackers if they want in, they will get in!

                  George has not optimized it, this script is generated by centmin (I have been using centmin for quite some time now).

                  I have been using the mysqltuner to optimize it myself, so this could of affected it... but I do not remember editing the time wait???

                  Thank you Michael,

                  Could you just help me make the link between the My.cnf time outs and the max_memory in the php.ini?

                  Mick
                  Hi Mick, just to be sure, you're using my Centmin Mod or original Centmin ? Pretty sure from my.cnf it's Centmin Mod as it defaults to using MariaDB 5.2 for MySQL. If so just edit your memory_limit and raise it to 256MB seeing as you have the memory for it. In SSH telnet just type command line shortcut phpedit to edit php.ini and scroll down and edit memory_limit value

                  FYI, Centmin Mod by default is tuned for low memory systems i.e. 256-512MB memory VPS etc, so has lower defaults but can be tuned to handle larger servers. Some very large multiple web server based vB forums are now using Centmin Mod once tuned for such

                  Which version of Centmin Mod you using http://centminmod.com/changelog.html ? v1.2.2-eva2000.20 is latest stable but v1.2.3 beta is coming soon
                  :: Always Back Up Forum Database + Attachments BEFORE upgrading !
                  :: Nginx SPDY SSL - World Flags Demo [video results]
                  :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...