bartv
(Bart )
20 أكتوبر 2023، 5:57ص
1
في نسختنا، غالبًا ما يكون تحميل قائمة القوالب بطيئًا جدًا (فكر في 5-10 ثوانٍ)، أو حتى يتعطل بعد انتظار طويل مع خطأ 502. لدينا ما مجموعه 15 قالبًا، وبخلاف ذلك، يعمل برنامج Discourse الخاص بنا بشكل جيد. أي أفكار؟
bartv
(Bart )
25 أكتوبر 2023، 5:52ص
2
هل من مجيب؟ نحن في ورطة بعض الشيء لأن الردود المعلبة معطلة وهذا لا يعمل معنا أيضًا..
أنا في حيرة من أمري بعض الشيء بشأن هذا الأمر، أخشى ذلك. لدينا أكثر من 15 قالبًا والقائمة الخاصة بالقوالب تُحمّل بشكل جيد.
هل هناك أي شيء مميز في أي من قوالبك؟ هل يمكنك إلغاء إدراجها جميعًا وإعادة إدراجها واحدة تلو الأخرى لمعرفة ما إذا كان ذلك سيكشف عن أي شيء؟ (يجب أن يؤدي إلغاء الإدراج إلى إزالتها من القائمة النشطة)
bartv
(Bart )
25 أكتوبر 2023، 6:28ص
4
يبدو أنك على وشك اكتشاف شيء ما! حتى الوصول إلى الفئة التي تحتوي على قوالبي يؤدي إلى تحميلات بطيئة جدًا أو تعطل لقد ألغيت إدراج جميع المواضيع وقمت بتعطيل إضافة القوالب ولكن المشكلة لا تزال قائمة.
هممم. هل لديك أي إضافات قد تتنازع على اسم ‘Template’ بطريقة ما؟ هل لا يزال التحميل البطيء في تلك الفئة مستمرًا في الوضع الآمن؟
إعجاب واحد (1)
bartv
(Bart )
25 أكتوبر 2023، 6:33ص
6
نعم، كنت فقط أختبر ذلك - نفس المشكلة في الوضع الآمن. سأحاول إنشاء فئة جديدة ونقل بعض القوالب إليها، لمعرفة ما إذا كان ذلك سيصلح الأمور.
إعجابَين (2)
bartv
(Bart )
25 أكتوبر 2023، 6:40ص
7
لقد أصلح ذلك! شكراً لتوجيهي في الاتجاه الصحيح
إعجاب واحد (1)
Jagster
(Jakke Lehtonen)
25 أكتوبر 2023، 8:04ص
8
هل تشعر بالرغبة في مشاركة ما كان معطلاً؟ فقط في حالة كان شخص آخر يعاني من مشاكل مماثلة.
إعجاب واحد (1)
bartv
(Bart )
25 أكتوبر 2023، 8:45ص
9
لم أقضِ وقتًا في البحث في الأمر وقمت فقط بالتخلص من الفئة القديمة.
system
(system)
تم إغلاقه في
24 نوفمبر 2023، 8:46ص
10
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
أعتقد أننا ربما وجدنا سبب ذلك، لأي مسافرين مستقبليين. أعتقد أنه يجب إصلاحه عند دمج هذا:
main ← fix/list-slowness
opened 04:56AM - 31 Jan 24 UTC
Some communities were noticing that fetching the list of templates was very slow… .
This issue wouldn't just affect the templates form, but also browsing the templates category and
Most of the communities didn't look like they were affected but in some with extreme cases, this was causing 502 errors.
The problem also seemed intermittent, with the slowness going away completely without any special action.
Upon inspecting a particularly affected instance, the problem was narrowed down to the list of subcategories from the categories templates that was repeating the same `id` multiple times.
The issue was tracked to a line that was mutating an array returned by the method `Category.subcategory_ids` and prepending an item. Unfortunately, the result of this method was cached in the `DistributedCache` and mutating the array was causing the cached value to pile up the same category `id` in the array.
This caused the database queries that used the value returned for this function to become slow over time when the argument was the templates category. The busier the Community, the worst the problem would get.
This commit removes the `prepend` that was causing the issue.
7 إعجابات