wppa_session table got huge
-
Hello,
I experienced on some of my websites that database has grown huge. Actually wppa_session table got very big for example on this site I attached link to. It contains 1100 albums and 16777 photos. I know it’s a decent bunch of pics but this table looks too big for me.
Is there any way to decrease this size and prevent growing so big?
Best regards, ErikThe page I need help with: [log in to see the link]
-
Up to 10.000 albums and 1.000.000 photos should be no problem. This has nothing to do with the session db table.
It is most likely that the session db table contains a lot of empty space. Session entries are valid during one hour, and are deleted after 24 hours.
Try optimizing your db using the plugin WP-optimize. If this does not help, what i doubt, you may TRUNCATE TABLE of the session table on the phpMyAdmin. This will do no harm.
-
This reply was modified 7 years, 2 months ago by
Jacob N. Breetvelt.
I use WP DB Cleaner plugin which works well. I’ve just tried WP Optimize too but it cannot reduce the size of the wppa_session table. Actually it doesn’t cause big problems. It can make a little bit slower the site but can live with it.
It’s strange that not all my sites acts like this. Its wppa_session table’s size extremely big, about 260MB. That’s why I try to find out how can this so big?
Thanks for your help.
To make sure everything works as it should, i would like you to do the following:
1. Table VIII-C4 click the ‘Show!’ button to list the session data. The header says something like
List of sessions ( Max 1000 entries of total 407 )
. What is your total, and is this a realistic value for the number of visitors during the last 24 hours? A session entry is valid during one hour, so if a certain user (ip address) loads pages during one hour, it is in the same entry, he will get a new one after one hour.2. What is your value of the php varable
max_execution_time
? See Table XII in the php configuration table.3. Tick Table IX-A9.1: Log Cron. After at least one hour, inspect the logfile in Table VIII-C1 and look for lines like:
Cron: on:December 12, 2017 9:56 am: cron-job: wppa_cleanup started. Cron: on:December 12, 2017 9:56 am: cron-job: wppa_cleanup completed.
The question is: do they show up, especially the second ‘wppa_cleanup completed.’
1. ( Max 1000 entries of total 104637 ) – It’s totally impossible. The number of visitors can be about 100-200 during 24 hours.
2. max_executio_time is 30
3. They don’t show up in the logfile.
Please keep the log cron switch on, and look tomorrow if any cron job works.
Preferrably upload a few photos, just for testing, and delete them after a few minutes.You may install plugin Crontrol to monitor cron jobs.
I want to know if any wppa cron job is being scheduled anyway and will run.I uploaded some pics into a new album then deleted them. By the VIII/C4 nothing has changed. It looks the numbers of visitor are groving continually and cleanup doesn’t work. That causes the large size of database.
I installed the Crontrol plugin an found in Cron events these 29 wppa crons:
wppa_cleanup None wppa_do_cleanup() 2017-05-13 05:51:13 (now) hourlywppa_update_treecounts None wppa_do_update_treecounts() 2017-05-13 05:51:23 (now) Non-repeating
wppa_cron_event [“wppa_remake_index_albums”] wppa_do_maintenance_proc() 2017-05-13 05:51:43 (now) Non-repeating
wppa_cron_event [“wppa_remake_index_photos”] wppa_do_maintenance_proc() 2017-05-13 05:51:43 (now) Non-repeating
wppa_cron_event [“wppa_cleanup_index”] wppa_do_maintenance_proc() 2017-12-12 17:13:43 (now) Non-repeating
wppa_cleanup None wppa_do_cleanup() 2017-12-12 17:21:31 (now) Non-repeating
wppa_cleanup None wppa_do_cleanup() 2017-12-12 17:21:32 (now) Non-repeating
wppa_cleanup None wppa_do_cleanup() 2017-12-12 17:21:33 (now) Non-repeating
it is repeated… 2017-12-12 17:21:39 , 2017-12-12 17:21:44 , 2017-12-12 17:21:45 , 2017-12-13 00:20:19
Does it look like crons run but cleanup doesn’t work?
Set Table IX-A5 (Max execution time) to 28
Click ‘Run Now’ for wppa_cleanup on the crontrol page.
Now you should get at the bottom of the logfile:
Cron: on:December 13, 2017 10:09 am: cron-job: wppa_cleanup started. Cron: on:December 13, 2017 10:09 am: cron-job: wppa_cleanup completed.
If not, pls inspect the server error log for any fatal error at the time you did this.
I changed execution time and run the cron. The last line in the logfiel was:
Cron: on:2017-12-12 17:13: admin: wppa_cleanup_index scheduled by wppa_index_remove( ‘album’, ‘261’ ) on line 388 of wppa-index.php called by wppa_index_update
It looks cron cannot run. Should I contact with the hosting provider?Should I contact with the hosting provider?
Yes, indeed, it looks cron does not run. If possible i also recommend to increase the php var max_execution_time to 60 sec and after that Table IX-A5 to 45.
These values have been increased. I run cleanup cron manually but the size of wppa_session table hasn’t changed.
I got these messages when I run cleanup cron from Crontrol:
Successfully executed the cron event wppa_cleanup.
The DISABLE_WP_CRON constant is set to true. WP-Cron spawning is disabled.What if I delete wppa_session table? I suppose it contains the number of sessions, so it doesn’t cause problem if I delete. Am I right?
You deleted a few photos yesterday. They should be available for un-deletion minimum one hour, maximum 2 hours.
Look at the Photo Albums -> Album Admin screen, if you see a line (pseudo album) with deleted photos.
Please do not delete the table ( or run Table VIII-A1 immediate after deletion ), better do a manual ‘TRUNCATE TABLE’ this empties the table without deleting its structure.
Your cron jobs should run anyway, for index updating (needed for searching) etc etc.
-
This reply was modified 7 years, 2 months ago by
Jacob N. Breetvelt.
Yes, there is this text:
“There are 48 trashed photos that can be rescued”
I could edit and rescue them.It’s strange beacuse I have other sites with your plugin (same theme and same plugins on all of my sites) and cleanup cron works well on these sites. Is it possible to export-import WPPA settings from one into another site’s? However I use the same settings on all sites. Or what could I do to start cleanup cron? What should can start this cron?
Copying settings is not a good idea because of page ids in links etc.
Pls make sure you did NOT tick Table VIII-A0.2(Postpone cron). It is recommended to tick VIII-A0.1 (Ignore concurrency).
On Table VIII-A8.2: (Remake Index Photos) press the ‘Start as cron job’ button. The page will re-load, and indicate this proc is running as cron job. Watch the settings page for a few minutes, it should count down (every minute, the settings page sends an ajax request (heartbeat) every minute to trigger the cron job) how many togo, until a red Reload button appears.
OK, it’s done. Next step? ??
On the crontrol screen look for wppa_do_cleanup() and press the Run Now link. After completion, look if your deleted photos are gone. They should, if the cleanup did actually run.
Why do you have
define( 'DISABLE_WP_CRON', true );
? This could cause the problem. -
This reply was modified 7 years, 2 months ago by
- The topic ‘wppa_session table got huge’ is closed to new replies.