• Resolved antonyvk

    (@antonyvk)


    Hi !

    My front seems to infinitly wait when I access to any page having a call to an album (granted album, for your information there are 9k granted albums for the moment, goal is to have 36k).
    I looked into my mysql processlist and found it continually make queries like this one :
    SELECT COUNT(*) FROMwp_wppa_albumsWHEREowner= 'admin' ANDa_parent= '2564'

    a_parent is allways changing, probably to check all albums ? How to limit that ?
    Could it be due to autocreating user’s personal album ?

    Thanks for your help !

Viewing 15 replies - 1 through 15 (of 60 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Interesting capacity issue.

    I will design a smarter algorithm or a certain kind of internal cache to know quicker if a granted album needs to be created.
    It would be nice to know how many registered users will be the target approx?

    Thread Starter antonyvk

    (@antonyvk)

    Hummm, the target is around 20k users/day, so I need to consider lots of new users at start.
    Perhaps a good way could be to add a setting for asynchronous creation of users albums (and then call a cron job to check and do it) and an other setting (also activable with shortcode ?) to check if current granted album contains current user album (and then create it if needed, but only for this current granted album). Like that the plugin could be able to create albums once at a turn (so a new user won’t generate lots of inserts at a time), and missing albums will be created by cron job during day or night (with limit or not, depending of server load).
    What do you think of this suggestion ?

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    For the time being i have the following:

    IF You have 6.5.08 imnstalled, here is a new version of wppa-setup.php:
    https://plugins.svn.www.ads-software.com/wp-photo-album-plus/branches/6.5.09/wppa-setup.php
    This uses 1 ( ONE ! ) query per session to decide if there have albums to be created.
    If so, all the albums for the user will be created – but that is temporary. I need more inspiration. Maybe tomorrow.

    Replace your wppa-setup.php with the one in the link above, and see how it works.
    If everything fails, de-activate, delete and re-install as if it was a new plugin. You will loose nothing.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Got a good fix now.

    You need to replace wppa-setup.php with the patched file https://plugins.svn.www.ads-software.com/wp-photo-album-plus/branches/6.5.09/wppa-setup.php ( again, if you did this already ).

    How it works:

    Per pageload there is one query to see what child albums of granted parents exist for the current user, only if the feature is enabled.
    On places where a front-end photo upload dialog could be or is displayed on an album cover or thumbnail display, it is verified if this album is a grant parent. If so, it is verified if a subalbum for the current user already exists. If not: an album will be created, in this case also one query.

    On the next page-load, the album will show up ( if appliccable ).

    Only if the user enters the Album Admin, Upload Photos or Import Photos admin page, all his not already created granted albums will be created, one query for the test and one query for each album to create.

    This should fix the capacity issue, and reduce the queries for this feature to the bare minimum.

    This fix will also be integrated in the coming release version 6.6.00

    Thread Starter antonyvk

    (@antonyvk)

    Wonderful ! Now I need to prepare updates and test it ??

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Additional note: An upload widget with an album selection list will also trigger all albums for the user to be created, but still only one query for the test and one for each album to create.
    ALso, even the test is only done when an album cover or thumbnail area is shown on the page.

    Pls keep me informed about your findings.
    Good luck.

    Thread Starter antonyvk

    (@antonyvk)

    I’m looking to adapt my css and other personal tricks for the moment ?? I found a css bug in theme/wppa-styles.css : I think .FotomotoBarLink won’t float left correctly.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Thanx. Will be fixed.

    Thread Starter antonyvk

    (@antonyvk)

    passed dev and beta, but take a very long time to load backend settings because Table VIII B19.1 and B19.2 are listing all albums to move from/to. Will probably need a checkbox to display/load (or not) this setting ?

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    I will get into this.

    Thread Starter antonyvk

    (@antonyvk)

    I updated my wppa-settings-autosave.php to delete both select functions and it works like a charm ??
    Now I’m waiting for more cpu on my server because of an other plugin that also has capacity issue ??

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    If you upgrade to 6.5.09 ( current release version, see settings table should read 6-5-09-003 or later )
    it is patched this way: If there are more than 200 albums, you can enter the album ids to copy from-to as opposed to selection boxes. This version also has the create granted albums fix from above.

    What about Table IX-D11 Grant parent(s)? Can not change this i think…

    Thread Starter antonyvk

    (@antonyvk)

    I wasn’t able to select all my granted albums correctly with this setting, so I did it with an SQL query (all the albums I have to grant have the same keyword in their title).

    I still have a capacity issue on my frontend, but I didn’t find enough informations for you for the moment. I just know I have an apache process permanently locked with 100% cpu, and this bug disappear when I deactivate your plugin :/

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Pls update to 6.6.00.011, the current dev version, see https://wppa.nl/docs-by-subject/development-version/ It conatins all fixes from above and many documented and un-documented features more.
    ver 6.5.xx is now frozen.

    If you can give your grant parents a category, i could change IX-D11 so that you can select an album cat rather than a selection. This would also remove the requirement for update the grant parents list, and remove a possible capacity problem on the value of IX-D11 itsself. ( Only in version 6.6.xx please )

    Thread Starter antonyvk

    (@antonyvk)

    Found it ! It’s in my upload shortcode !
    I use this shortcode : [wppa type="upload" parent="2"][/wppa]
    But as result I have an select box for selecting the album I want to upload my photos into, instead of just selecting the parent album/current user. I have this issue when I’m connected as admin, and I often need to check pages with admin status…

Viewing 15 replies - 1 through 15 (of 60 total)
  • The topic ‘lot of count when accessing an album page’ is closed to new replies.