[SOLVED] g3_sessions Database Size
MysticMTL
Joined: 2009-12-06
Posts: 27 |
![]() |
I updated to Gallery 3.0 mostly because of the better way G3 handles cache files, and with 20,000 photos, I was using up over 200,000 files, near the file limit of my webhost (1&1). So far Gallery 3 has reduced my files by over 100,000! However, now my issue is with the database usage. My host also has a limit of 100mb, and I've never had this issue in the past, but after going to sleep last night, everything was working fine. And I woke up about 7 hours later and my database is now 99.1mb, and climbing! Is there something I can do to have the g3_sessions entry automatically flushed? Or is there an underlying problem that I need to look at? I'm using the release version of Gallery 3.0, and it took about 2 days to transfer over my users and photos from my G2 installation. I'm using a separate database, with PHP5, since my G2 database was using PHP4. Here is my phpinfo file for my gallery directory: http://transitfan.com/gallery/phpinfo.php And my gallery address is: http://www.transitfan.com/gallery Please let me know if you need any additional information. Thanks in advance! Edit: Here is some more information regarding my gallery3 installation: Platform information * Host name: Linux infong 2.4 #1 SMP Wed Nov 4 21:12:12 UTC 2009 i686 GNU/Linux Gallery stats * Version: 3.0 (Santa Fe) |
|
Posts: 7994
Oof. I have the same problem! I hadn't noticed it, but my sessions table was 460M. I think that's happening here is that search engines are creating sessions much, much faster than they naturally expire. Most search engines don't propagate cookies forward, so they wind up with a new session each time.
I just submitted some code to fix this. It'll identify all the popular crawlers and keep them from creating a session in the database. Grab the latest experimental code, truncate your sessions table and try it out.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 27
Great! You and your team is amazing!
Quick response and fast fix!
I'll update with the experimental code now and let you know what happens.
Thanks!
Posts: 241
Hmmm.. I'll have to grab this. Glad I saw this before I swapped my gallery3 install to my gallery.markheadrick.com sub-domain which is linked to all over the place.
Thanks,
Mark H.
Using Gallery 2.2.6 - gallery.markheadrick.com
Posts: 27
Ok I updated the gallery to 3.0+git and checked out the g3_sessions usage. It was at about 200kb last night, and this morning it was back again at 12,000kb. And 56mb of used database space. When I truncated the 12,000kb of space from the g3_sessions in the database, and went back to the usage page, it still said 56mb in use. What I can figure is that the g3_sessions gave me a false reading for a second, and was infact functioning as it should, since the database size didn't change when I truncated g3_sessions.
I'll keep you informed if something changes.
Posts: 27
Alright, 24 hours have passed since I updated the gallery with the new fix, and it seems to be working. My database size has remained constant.
My only question is that the g3_sessions size claims that it's 24,500kb now, but it is infact empty if I try and empty it again, so it's not taking any space any longer. So even if I truncate it back to 0kb, it doesn't take any space anymore!
So I think this issue has been resolved!
Thanks!