Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-15675

Constraint on table sessions_keys solves memory leak

    XMLWordPrintable

Details

    Description

      I run a phpBB car forum ([Citroën Akuten|https://citroenakuten.com] with more than 21800 registered users.

      Lately I have seen the error message "PHP Warning: Unknown: Unable to allocate memory for pool. in Unknown on line X" (X being all sorts of line numbers)

      All over assorted help fora's the standard fix are always "increase memory setting" here and there. This however only over time worsen the problem.

      I believe I have found the root cause of these "brown outs";

      Table sessions_keys allows multiple data for the same user_id from the same last_ip (see my attached short-list from my own site "sessions_keys_bugreport.xlxs"). Note that I have added some columns to identify doublets and count the occurrence.

      Or run the following SQL on some sample database
      SELECT `user_id`, `last_ip`, count AS count FROM `phpbb_sessions_keys` GROUP BY `user_id`, `last_ip`

       

      I suggest that the database may not contain doublets in this aspect which I manually cleaned out and now are trying. I have had no errors at all since then but the doublets will of course slowly grow back. When first examined my sessions_keys it contained around 35-36.000 lines. It's now at 8.650 lines and the site has never felt faster!

      Attachments

        Activity

          People

            CHItA CHItA
            johangrimm johangrimm
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: