As described a long time ago (2017) on https://piwigo.org/forum/viewtopic.php?id=28338 there is a performance issue when you have: many photos/albums + frequent user_cache reset + many simultaneous anonymous visitors. With #1367 and the "lounge" we reduced the frequency of user_cache reset because the reset occurs only for a set of uploaded photos, not each photo individually.
First, if you upload photos one by one, the lounge has no effect. That's a first "problem".
Secondly, when the user_cache is reset, if you have 10 pages opened at the same time by user guest (anonymous visitor), the user_cache for guest user is regenerated 10 times in parallel. And of course, the concurrent compute enters into conflict. Instead of taking 1 or 2 seconds to compute, the user_cache may take 40 to 80 seconds (in an example I worked on yesterday). The MySQL server gets stuck and the whole Piwigo becomes awfully slow.
The solution I've worked on is to use the new pwg_unique_execution system (introduced for send_piwigo_infos) : only the first visit triggers the user_cache generation while other requests go into sleep as long as the user_cache is not rebuilt. Result has been crazy efficient 🥳
See https://piwigo.org/forum/viewtopic.php?id=34021
As described a long time ago (2017) on https://piwigo.org/forum/viewtopic.php?id=28338 there is a performance issue when you have: many photos/albums + frequent `user_cache` reset + many simultaneous anonymous visitors. With #1367 and the "lounge" we reduced the frequency of `user_cache` reset because the reset occurs only for a set of uploaded photos, not each photo individually.
First, if you upload photos one by one, the lounge has no effect. That's a first "problem".
Secondly, when the `user_cache` is reset, if you have 10 pages opened at the same time by user guest (anonymous visitor), the `user_cache` for guest user is regenerated 10 times in parallel. And of course, the concurrent compute enters into conflict. Instead of taking 1 or 2 seconds to compute, the `user_cache` may take 40 to 80 seconds (in an example I worked on yesterday). The MySQL server gets stuck and the whole Piwigo becomes awfully slow.
The solution I've worked on is to use the new `pwg_unique_execution` system (introduced for `send_piwigo_infos`) : only the first visit triggers the `user_cache` generation while other requests go into sleep as long as the `user_cache` is not rebuilt. Result has been crazy efficient 🥳
<!-- github-sync-id:2779770910 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
See https://piwigo.org/forum/viewtopic.php?id=34021
As described a long time ago (2017) on https://piwigo.org/forum/viewtopic.php?id=28338 there is a performance issue when you have: many photos/albums + frequent
user_cachereset + many simultaneous anonymous visitors. With #1367 and the "lounge" we reduced the frequency ofuser_cachereset because the reset occurs only for a set of uploaded photos, not each photo individually.First, if you upload photos one by one, the lounge has no effect. That's a first "problem".
Secondly, when the
user_cacheis reset, if you have 10 pages opened at the same time by user guest (anonymous visitor), theuser_cachefor guest user is regenerated 10 times in parallel. And of course, the concurrent compute enters into conflict. Instead of taking 1 or 2 seconds to compute, theuser_cachemay take 40 to 80 seconds (in an example I worked on yesterday). The MySQL server gets stuck and the whole Piwigo becomes awfully slow.The solution I've worked on is to use the new
pwg_unique_executionsystem (introduced forsend_piwigo_infos) : only the first visit triggers theuser_cachegeneration while other requests go into sleep as long as theuser_cacheis not rebuilt. Result has been crazy efficient 🥳