Announcement

Collapse
No announcement yet.

Memcache & datastore problem with maxloggedin

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

  • Memcache & datastore problem with maxloggedin

    Hi,

    I´ve recently implemented memcache for my forums because we have more than 2500 users online and using datastore cache in filesystem is not enough, now I have a strange problem with the maxloggedin item in datastore, the problem is that when I enable memcache in config.php the maxloggedin in db is converted in a NON serialized format, I've attached the content of the maxloggedin, the problem is that the weight of the data is 1.3MB!! ANd all of the get into memory for every php executed...so the server load goes to the sky in seconds...

    When I revert the config.php to filesystem the maxloggedin get normal again:
    Code:
    a:2:{s:9:"maxonline";i:1625;s:13:"maxonlinedate";i:1167275751;}
    I´ve disabled the hooks/plugins system for testing and the same issue appears...

    Is this a bug?

    Psico.
    PS: Sorry about my poor english.
    Attached Files
    La mayor comunidad de habla hispana - www.psicofxp.com

    Mi blog: psicogeek.com


  • #2
    Is this only happening for the 'maxloggedin' value?
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment


    • #3
      Yes, only with the maxloggedin.
      La mayor comunidad de habla hispana - www.psicofxp.com

      Mi blog: psicogeek.com

      Comment


      • #4
        Can you make sure that the 'unserialize' value for the maxloggedin row in the datastore table of your database is set to 1?
        Best Regards
        Colin Frei

        Please don't contact me per PM.

        Comment


        • #5
          Originally posted by Colin F View Post
          Can you make sure that the 'unserialize' value for the maxloggedin row in the datastore table of your database is set to 1?
          Yes, is set to 1.
          La mayor comunidad de habla hispana - www.psicofxp.com

          Mi blog: psicogeek.com

          Comment


          • #6
            You have a non-vB page which is trying to use/update the maxloggedin value, but isn't doing it properly (it's probably coded for 3.5).

            Comment


            • #7
              Nope, I don´t have any non-VB page messing with this, I´m using plugins for everything. And why the problem appears only when I changed the datastore cache to memcache?
              La mayor comunidad de habla hispana - www.psicofxp.com

              Mi blog: psicogeek.com

              Comment


              • #8
                You do though. The main page of your site clearly integrates with various bits of vB data, including the number of users online. That is probably the cause of it.

                I can't say why it only becomes noticeable when using Memcache off hand.

                Comment


                • #9
                  The main page use plugins to create this information, if you want I can give you access to my server to verify this. And the problem persist when I disable the hook/plugin system.
                  La mayor comunidad de habla hispana - www.psicofxp.com

                  Mi blog: psicogeek.com

                  Comment


                  • #10
                    One more thing, the bits of vB data that we are using to show in the header, it´s showing in ALL the pages of the site, not only in the homepage, and this info it´s not from the "maxloggedin" value...the users online is from the sessions table, the other info is from (messages, users, etc..) are from different tables and querys that we run with a vbcron but they are not related to maxloggedin...
                    La mayor comunidad de habla hispana - www.psicofxp.com

                    Mi blog: psicogeek.com

                    Comment


                    • #11
                      Add the following code to the build_datastore() function in functions.php. (Do it after the "global $vbulletin" line.)

                      Code:
                      	if ($title == 'maxloggedin' AND $unserialize != 1)
                      	{
                      		mail('[email protected]', 'Invalid maxloggedin call!', var_export(debug_backtrace(), true));
                      	}
                      Change [email protected]ess as necessary. This should email you with a backtrace of a bad call.

                      Run that for a little while. If it doesn't generate anyway, update the ticket with FTP details and ask for it to be assigned to me.

                      Comment


                      • #12
                        Originally posted by Mike Sullivan View Post
                        Add the following code to the build_datastore() function in functions.php. (Do it after the "global $vbulletin" line.)

                        Code:
                        	if ($title == 'maxloggedin' AND $unserialize != 1)
                        	{
                        		mail('[email protected]', 'Invalid maxloggedin call!', var_export(debug_backtrace(), true));
                        	}
                        Change [email protected]ess as necessary. This should email you with a backtrace of a bad call.

                        Run that for a little while. If it doesn't generate anyway, update the ticket with FTP details and ask for it to be assigned to me.
                        Nope, i´m not receiving an email. I´ve tested removing the "AND $unserialize != 1" part and I get emails without any problem...

                        I´m going to update the ticket with ftp details. Tnx!
                        La mayor comunidad de habla hispana - www.psicofxp.com

                        Mi blog: psicogeek.com

                        Comment

                        Related Topics

                        Collapse

                        Working...
                        X