Announcement

Collapse
No announcement yet.

Intermittent slow posting with "Stay on page? warning

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Intermittent slow posting with "Stay on page? warning

    Forum running vBulletin Suite 4.2.5. Until a week ago, I was running a second forum only 4.2.5 with the same issues.

    I recently downgraded from a dedicated server to a VPS to save costs:
    • CENTOS 7.3
    • WHM v66.0.18
    • running PHP 7.1.9
    • 48 processors, each listed as: Intel(R) Xeon(R) CPU E5-2670 v3 @ 2.30GHz, Cache 30720 KB
    • RAM: 6GB
    • Storage: 150GB
    • Bandwidth: 5TB


    Settings (these have been tweaked and produced some improvement but intermittent problem still exists):
    • PHP Max Post Size 1.00 GB
    • PHP Maximum Upload Size 1.00 GB
    • PHP Memory Limit 1.00 GB
    • MySQL Version 10.2.8-MariaDB
    • MySQL Packet Size 512.00 MB


    Problem: When starting a new thread or posting a reply to an existing thread, it is very slow with the post taking several seconds to complete. Often it then pops up a warning message saying I am asking to leave the page - stay on page? leave page? If I dismiss that and refresh the page, the post is there.

    However, many members faced with the slow posting or the warning click submit again, resulting in double or even triple posts.

    None of these were issues on my previous dedicated server.

    Additional information: This is most likely to happen on the first post/reply of the day. After that, the posts seem to go through normally with no errors or double posts (at least for me on a desktop with a high speed connection).

    Question: Any idea what is likely to be causing this and what I can do to fix it?
    Last edited by djbaxter; Sun 10th Sep '17, 7:07am.
    Psychlinks Mental Health Support Forum
    Local Search Forum

  • #2
    Something is causing the pop-up when vBulletin tries to do its AJAX reload. The popup is causing the delay. vBulletin 4.X doesn't ask if you want to stay or leave a page if it hasn't finished submitting its content. This sounds like a browser or third-party addon issue.

    Double / Triple Posts are caused by the resubmit. The server hasn't finished creating the first submit so there is no post hash to compare subsequent submissions get processed instead of throwing a duplicate content error. The way to prevent this is patience in the users.

    Slow submission is probably caused by your MySQL settings more than your PHP settings (which are abnormally high). Are you using INNODB tables?
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud customization and demonstration site.
    vBulletin 5 Documentation - Updated every Friday. Report issues here.
    vBulletin 5 API - Full / Mobile
    Vote for your most annoying bugs.
    I am not currently available for vB Messenger Chats.

    Comment


    • #3
      Yes I should have clarified that - The popup is a Firefox notice, not vBulletin.

      All core tables are MYISAM. There are two Inno tables used by the DBTech Thank you add-on.
      Psychlinks Mental Health Support Forum
      Local Search Forum

      Comment


      • #4
        I recommend switching all tables to INNODB except language, phrase and all the searchcore, searchgroup tables.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud customization and demonstration site.
        vBulletin 5 Documentation - Updated every Friday. Report issues here.
        vBulletin 5 API - Full / Mobile
        Vote for your most annoying bugs.
        I am not currently available for vB Messenger Chats.

        Comment


        • #5
          Originally posted by Wayne Luke View Post
          I recommend switching all tables to INNODB except language, phrase and all the searchcore, searchgroup tables.
          Thank you. I will try that. I also just turned off persistent connections for MySQLi in php.ini - is that likely to help? or make it worse?
          Psychlinks Mental Health Support Forum
          Local Search Forum

          Comment


          • #6
            Generally speaking you should not be using persistant connections anyway.
            Since you are using MariaDB, you also have the choice of Aria (an updated MyISAM) although in your version (10.2), Innodb is the preferred default.
            Note that fatal crashes of Innodb can be much harder to recover from than MyISAM, even with the file_per_table option enabled, so make sure you have good backups.
            This is my signature.

            Comment


            • #7
              Originally posted by stingray27 View Post
              Generally speaking you should not be using persistant connections anyway.
              They have been turned off.

              Originally posted by stingray27 View Post
              Since you are using MariaDB, you also have the choice of Aria (an updated MyISAM) although in your version (10.2), Innodb is the preferred default.

              Note that fatal crashes of Innodb can be much harder to recover from than MyISAM, even with the file_per_table option enabled, so make sure you have good backups.
              One of the reasons I have not yet converted to InnoDB, the other major one being time. I am looking at all other factors I can think of first, like plugins.

              Psychlinks Mental Health Support Forum
              Local Search Forum

              Comment


              • #8
                The difference between MyISAM and INNODB here is the locking mechanism. MyISAM does a table level lock every time you write to it. This causes queries to back up and why the Master/Slave scenario was added in 3.X. You could read from the slave and write to the master to hide some of this locking. With newer versions of MySQL and MariaDB relying on Clusters, the Master/Slave Scenario doesn't work as well. With INNODB, you get row-level locking so only the row being written to is locked and the database can still read from other rows. This prevents scenarios like you are experiencing without relying on expensive clusters.

                You can set up your system to do daily backups with a script we provide in your do_not_upload folder and then use binary logging to catch any further queries between backups. Do a google search on incremental backups using binary logs in MySQL. Further optimizations on your database buffers may help as well.
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud customization and demonstration site.
                vBulletin 5 Documentation - Updated every Friday. Report issues here.
                vBulletin 5 API - Full / Mobile
                Vote for your most annoying bugs.
                I am not currently available for vB Messenger Chats.

                Comment


                • #9
                  Wayne, I am reading/being told that there can be some drawbacks to using InnoDB, though. What is your opinion? Do you use InnoDB yourself?

                  For example:

                  InnoDB has many more features and is a bit more complicated than MyISAM. As such, InnoDB uses more system resources (such as RAM) than MyISAM.
                  Emphasis added: Given that my current VPS is 6GB RAM compared to the 8GB I previously had, I'm concerned that this might be an issue. (There are several other sites on this same server, mostly WordPress sites.)


                  InnoDB is better for write-intensive websites, those sites that heavily utilize inserts and updates. MyISAM is better suited for read-intensive sites, those that heavily use select.
                  Emphasis added: This would certainly seem to describe a forum site.
                  Last edited by djbaxter; Wed 13th Sep '17, 6:14pm.
                  Psychlinks Mental Health Support Forum
                  Local Search Forum

                  Comment


                  • #10
                    My take is that all sites should use INNODB with either MySQL 5.7+ or MariaDB 10+.The performance benefits outweigh the negatives in my experience. RAM would be used by the MySQL server and released when not used. You can control this with your MySQL Configuration. If you couple this with PHP 7+, any cost in RAM could be offset by PHP's lower memory requirements.
                    Translations provided by Google.

                    Wayne Luke
                    The Rabid Badger - a vBulletin Cloud customization and demonstration site.
                    vBulletin 5 Documentation - Updated every Friday. Report issues here.
                    vBulletin 5 API - Full / Mobile
                    Vote for your most annoying bugs.
                    I am not currently available for vB Messenger Chats.

                    Comment


                    • #11
                      Thank you. I took the plunge and converted last night. We'll see if that helps prevent double posting. I'm seeing some slow posts this morning but no errors or double posts yet.
                      Psychlinks Mental Health Support Forum
                      Local Search Forum

                      Comment


                      • #12
                        I just updated to 4,2.5 and having same problem. I don't know what INNODB is.

                        Comment


                        • #13
                          Originally posted by Super Cat View Post
                          I just updated to 4,2.5 and having same problem. I don't know what INNODB is.
                          See http://www.inmotionhosting.com/suppo...odb-and-myisam
                          Psychlinks Mental Health Support Forum
                          Local Search Forum

                          Comment


                          • #14
                            Well, converting to InnoDB did not resolve the problem. I am still experiencing intermittent slow posting and double posting.
                            Psychlinks Mental Health Support Forum
                            Local Search Forum

                            Comment


                            • #15
                              The problem with vBulletin 4 is that it tries to submit a post via AJAX and if that doesn't succeed in a specific amount of time, it will perform a standard submission of the form. You can turn off all AJAX to prevent this. Settings -> Options -> General Settings.

                              What do your MySQL logs say when this occurs? What are the server loads when this occurs? Since you're on a VPS, you're ultimately sharing resources with others and depending on how it is configured, this can cause problems on your site. We'll need more information to continue diagnosing.

                              Translations provided by Google.

                              Wayne Luke
                              The Rabid Badger - a vBulletin Cloud customization and demonstration site.
                              vBulletin 5 Documentation - Updated every Friday. Report issues here.
                              vBulletin 5 API - Full / Mobile
                              Vote for your most annoying bugs.
                              I am not currently available for vB Messenger Chats.

                              Comment

                              Working...
                              X