[ZBX-10911] Zabbix frontend locales flapping Created: 2016 Jun 16 Updated: 2024 Apr 10 Resolved: 2019 May 01 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Documentation (D) |
Affects Version/s: | 3.0.3 |
Fix Version/s: | 4.4 (plan) |
Type: | Documentation task | Priority: | Trivial |
Reporter: | Igor Ivanov | Assignee: | Martins Valkovskis |
Resolution: | Fixed | Votes: | 3 |
Labels: | gettext, locale | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Gentoo linux, Apache web server. |
Attachments: | zabbix_frontend_flapping.png | ||||||||||||||||||||||||
Issue Links: |
|
||||||||||||||||||||||||
Team: | Team D | ||||||||||||||||||||||||
Sprint: | Sprint 50 (Mar 2019), Sprint 51 (Apr 2019) | ||||||||||||||||||||||||
Story Points: | 0 |
Description |
We have many users, most of them use Russian locale for frontend. Some - English. And we see that some parts of the page on English, other on Russian. If we have one user online we have no problems. But if we have two users online with different locales problem occurs. We had it on 2.2, 2.4.7 and 3.0.3 |
Comments |
Comment by richlv [ 2016 Jun 16 ] |
might be related to php gettext caching. |
Comment by Oleksii Zagorskyi [ 2016 Jun 17 ] |
At http://zabbix.org/wiki/Translating_Zabbix is an instruction where very last step is "restart your web server" Try to restart your web server. |
Comment by Igor Ivanov [ 2016 Jun 17 ] |
It doesn't help. |
Comment by Oleksii Zagorskyi [ 2016 Jun 17 ] |
Interesting. I have no idea how to troubleshoot it. |
Comment by Igor Ivanov [ 2016 Jun 17 ] |
https://www.zabbix.com/forum/showthread.php?t=41840 |
Comment by richlv [ 2016 Jun 17 ] |
zalex had a good point - are you using any other caching, like apc ? |
Comment by Glebs Ivanovskis (Inactive) [ 2016 Jun 17 ] |
I was reading gettext documentation when working on locale-related server issues and I've also seen bits of locale-related frontend code. I can't claim that I am 100% confident, but here is my understanding of the problem. Gettext uses environment variables to determine which language is desired. Environment variables can be set per process. Usual workflow to generate a page:
Imagine web server process generating pages for two users with different language settings:
As a result for user A upper part of the page is in his language, but bottom part is in the language of user B. I imagine that situation is getting worse when there are more users per web server process and problem appears more frequently on the pages which take longer time to generate. Dear zalex_ua, have you tried to reproduce? Now we need PHP developers to come and share their thoughts. |
Comment by Igor Ivanov [ 2016 Jun 17 ] |
richlv, nope. Interesting. I've changed all users 'lang: to 'ru_RU' in DB, restarted apache, but still have problem. |
Comment by Oleksii Zagorskyi [ 2017 Aug 02 ] |
Cross linking - |
Comment by Eugene Kravtsov [ 2017 Nov 08 ] |
Got the same problem after upgrade to 3.4.4 |
Comment by Eugene Kravtsov [ 2017 Nov 09 ] |
Actually |
Comment by Andrey [ 2018 Dec 09 ] |
Have this problem since 2.0... |
Comment by Glebs Ivanovskis [ 2018 Dec 09 ] |
Dear _Andrey, could you provide more information about your setup? |
Comment by Andrey [ 2018 Dec 09 ] |
Thanks for reply I had submitted a bug report ( |
Comment by Andrey [ 2018 Dec 09 ] |
I have an excellent news because, as i think, i have found the solution of the problem! The problem that is gettext itself, on which is zabbix translation is related, is not support safe multithreading, so disabling multithreading in php and apache (USE="-threads" APACHE2_MPMS="prefork" - for gentoo users) solve this problem. Another workaround, for saving multithreading abilities, is to integrate some framework such Zend_Translate into zabbix frontend but unfortunately i cannot complete such difficult task at the moment... so multithreading, unfortunately, is a necessary sacrifice. |
Comment by Glebs Ivanovskis [ 2018 Dec 09 ] |
Great news, _Andrey! My guess was close, but you killed the issue. Now it's time to share the solution in that forum thread and community portal. Dear martins-v, do you think it's worth adding this information to official documentation? |
Comment by Martins Valkovskis [ 2019 Apr 18 ] |
Added to the known issue listing for the currently supported versions: 2.2, 3.0, 4.0, 4.2. |
Comment by Glebs Ivanovskis [ 2019 Apr 18 ] |
Are you sure "flipping" is a good alternative for "flapping"? |
Comment by Martins Valkovskis [ 2019 Apr 18 ] |
In this case "flipping" is just a form of the verb "flip" that seemed like a common word to use for something changing places randomly. "Flapping" implies a subject - something or somebody that does the "flapping" which in this case is, at least originally, very obscure. But I'm sure that a case could be made for "flapping" as the better way. |