Hi, i have installed a wp multisite with about 600 Blogs.
Therefor I created a Backend-Plugin to set the user-roles for multiple blogs with one-click.
Within this Plugin i use the wp-core functions add_user_to_blog and remove_user_from_blog (they use the switch_to_blog-function itself)… so if i change the role for 50+ Blogs at once, the script needs about 20-30 seconds to finish my request.
Now the Problem is, that in this 20-30 seconds the script needs the hole wp Multisite is frozen. So there is no other request (frontend and backend) possible. After my script finished, the other requests finish too.
The Server should have no Problem, cause i have an Intel QuadCore with Hyperthreading (8 processors) and 32 GB RAM only for this project. I use a nginx/php-fpm/mysql – Setup.
While the wordpress is frozen, its possible to search the database with the same username wordpress is using via phpmyadmin and its also possible to do php-requests on the same domain outside the wordpress-logic…
So for me it looks like that wordpress freeze the site on purpose. May anyone help me to solve my problem, cause i think there is no need to freeze the frontend if I change some roles from users.