-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecated: preg_replace() error when beeing assigned to many roles #5164
Comments
Hi, the error you get is only a symptom. Since the user's in question, which get the error, are members of so many roles, I guess most if not all roles define a restriction? Then queries get pretty large due to a large filter. The part of the code which is the actual reason, seems to have a problem with that. Try increasing the PCRE backtrack or recursion limit. Please report back where you've changed these directives if it doesn't have the desired effect. |
Hi, |
Then you should think about changing the role configuration. It may be possible to reduce the number of roles to one, by optimizing the restrictions. Say, you have three roles, each with a restriction:
They can be combined like this:
The goal is to reduce the number of conditions. To minimize the size of the resulting expressions in the queries. You can see the size of the filter in the audit view. Navigate to I know, this is probably not an easy task. But given such a high number of roles, and the problem being limited to users with that much roles, I think this is a safe bet that it would solve the issue. (and enhance future maintainability?) |
After updating to php 8.1 users who have more than ~70 roles assigned, get the following message
It's really on the amount of assigned roles. We already assigned role by role without getting the error. Also assigning 60 roles and less doesn't shows it. We have many business processes and one role for each bp, so the responsible collegue only sees his own hosts and services. But his teamleader sees all objects below while beeing assigned to all roles.
Expected behavior
not throwing an Deprecated Error when beeing assigned to many roles.
Screenshots
If applicable, add screenshots to help explain your problem.

Your Environment
Include as many relevant details about the environment you experienced the problem in
icinga2 --version
): 2.14.0php --version
): 8.1Additional context
The text was updated successfully, but these errors were encountered: