? Release Blocker ? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
18 Feb 2022

Pull Request for Issue #37080.

Summary of Changes

Define a header limit for the server response time in debug mode. This is required due some limits in web servers.

The limit is set to 4000 which should fulfill all common web servers. according to https://stackoverflow.com/a/8623061.

Testing Instructions

  • Use nginx web server.
  • Create a lot of dashboard modules.
  • Enable debug mode in Joomla configuration.

Actual result BEFORE applying this Pull Request

Bad gatweway error as in issue.

Expected result AFTER applying this Pull Request

Site is rendered properly.

avatar laoneo laoneo - open - 18 Feb 2022
avatar laoneo laoneo - change - 18 Feb 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Feb 2022
Category Front End Plugins
avatar laoneo laoneo - change - 18 Feb 2022
Labels Added: ?
avatar zero-24
zero-24 - comment - 18 Feb 2022

Can we get a backport of this for 3.10 too?

avatar Fedik
Fedik - comment - 18 Feb 2022

Maybe a better do not add $metric when it too big, because adding "half data" will show incorrect "timing", that may mislead.
Or I missed something?

avatar Fedik
Fedik - comment - 18 Feb 2022

@zero-24 we do not have it in 3.10, it was a new feature in 4.1 ?

avatar zero-24
zero-24 - comment - 18 Feb 2022

Ha ok no backport needed in this case :D

avatar richard67
richard67 - comment - 18 Feb 2022

@laoneo Does this PR solve issue #37080 so the issue can be closed?

avatar laoneo
laoneo - comment - 18 Feb 2022

@laoneo Does this PR solve issue #37080 so the issue can be closed?

At the end of the day it should solve it

avatar laoneo
laoneo - comment - 18 Feb 2022

Maybe a better do not add $metric when it too big, because adding "half data" will show incorrect "timing", that may mislead. Or I missed something?

I was thinking the same, perhaps we should then return one entry with a message too much data.

avatar mikeazores
mikeazores - comment - 18 Feb 2022

In reference to #37080 if I lower the strlen value to say 3600 IT WORKS. With the current PR value (4000) I still have problems.

avatar zero-24
zero-24 - comment - 18 Feb 2022

@laoneo do you think it makes sense to make that a option within the plugin with a default value for 4k (Yes I also hate new options)? So on sites such as @mikeazores 's he can lower the value but on other sites we can use the 4k / 8k etc.?

avatar Fedik
Fedik - comment - 18 Feb 2022

I was thinking the same, perhaps we should then return one entry with a message too much data.

Or maybe do only 2 point timing: between start-end (when too big).
Sadly we cannot easily exclude timings for modules.

avatar laoneo
laoneo - comment - 18 Feb 2022

@laoneo do you think it makes sense to make that a option within the plugin with a default value for 4k (Yes I also hate new options)? So on sites such as @mikeazores 's he can lower the value but on other sites we can use the 4k / 8k etc.?

For me it should work properly out of the box and it is not that critical, that it must always return a value.

I was thinking the same, perhaps we should then return one entry with a message too much data.

Or maybe do only 2 point timing: between start-end (when too big). Sadly we cannot easily exclude timings for modules.

We can, and deliver module rendering as one metric when there is a string like mod_ in the profile step.

avatar BrainforgeUK
BrainforgeUK - comment - 18 Feb 2022

Sorry, 4000 limit is too large, I had to make it 3500 to get it to work on my server.
See #37090

The server-wide Nginx settings for my server are 'out of the box'.

Can you making it configurable on the debug plugin parameters?
Default to 2000?
Warning about needing to change nginx settings if you increase it?
Suggest those nginx settings I grabbed earlier as examples?

avatar laoneo
laoneo - comment - 18 Feb 2022

@BrainforgeUK probably the better approach would be to collect the module ones as one entry. Having an option for such a small feature would be overhead.

avatar laoneo
laoneo - comment - 18 Feb 2022

The last commit adds a new behavior where the modules are collected together and are printed as one entry. @Fedik what do you think?

It looks then like:

image

avatar Fedik
Fedik - comment - 18 Feb 2022

Looks good to me.

Additionally still better to keep your previous approach with limit check, just to be safe, around 3K.
Because we cannot guarantee size when any extensions will add own Profiling data.

avatar laoneo
laoneo - comment - 19 Feb 2022

Added a limit again. Can you guys test it now so we can ship it with the next patch release?

avatar HLeithner
HLeithner - comment - 20 Feb 2022

Can you Plesse add 2 things?

  1. make the limit a parameter
  2. Add a line that to the metric that the limit got hit.

So it's possible to know that something is missing and that you can adjust it depending on your needs.

avatar laoneo
laoneo - comment - 20 Feb 2022

Adding a new parameter for such a small feature makes no sense and the majority will not even understand for what it is.

avatar HLeithner
HLeithner - comment - 20 Feb 2022

The parameter is in the debug plugin, the person configuring the plugin should know what the web does but OK, it's not important I guess. But the information that the data is truncated is important from my point of view.

avatar laoneo
laoneo - comment - 20 Feb 2022

How would you render that message?

avatar Fedik
Fedik - comment - 20 Feb 2022

How would you render that message?

Kind of last row in metrics

$metrics .= sprintf('%s;dur=%f;desc="%s", ', $index . 'Rest of data is gone forever', 'infinity', '');

?

avatar laoneo
laoneo - comment - 22 Feb 2022

Last commit shows now a truncated message:

image

If you want to test it, change the code if (strlen($metrics) > 3000) to if (strlen($metrics) > 1).

avatar Quy Quy - test_item - 25 Feb 2022 - Tested successfully
avatar Quy
Quy - comment - 25 Feb 2022

I have tested this item successfully on 9767226


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37087.

avatar laoneo
laoneo - comment - 25 Feb 2022

@BrainforgeUK and @mikeazores can you test it again as well?

avatar alikon alikon - test_item - 25 Feb 2022 - Tested successfully
avatar alikon
alikon - comment - 25 Feb 2022

I have tested this item successfully on 9767226


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37087.

avatar alikon alikon - change - 25 Feb 2022
Status Pending Ready to Commit
avatar alikon
alikon - comment - 25 Feb 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37087.

avatar laoneo laoneo - change - 25 Feb 2022
Labels Added: ?
avatar richard67 richard67 - change - 25 Feb 2022
Status Ready to Commit Pending
avatar richard67
richard67 - comment - 25 Feb 2022

Back to pending due to new changes.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37087.

avatar richard67
richard67 - comment - 25 Feb 2022

Back to pending due to new changes.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37087.

105dc3d 25 Feb 2022 avatar laoneo fix
avatar laoneo laoneo - change - 25 Feb 2022
Labels Removed: ?
avatar laoneo
laoneo - comment - 25 Feb 2022

We had the same problem with access when a none admin get logged in on the back end. The recent changes are grouping also access.

avatar BPBlueprint BPBlueprint - test_item - 25 Feb 2022 - Tested successfully
avatar BPBlueprint
BPBlueprint - comment - 25 Feb 2022

I have tested this item successfully on 105dc3d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37087.

avatar HLeithner HLeithner - test_item - 25 Feb 2022 - Tested successfully
avatar HLeithner
HLeithner - comment - 25 Feb 2022

I have tested this item successfully on 105dc3d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37087.

avatar richard67 richard67 - change - 25 Feb 2022
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 25 Feb 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37087.

avatar laoneo laoneo - change - 27 Feb 2022
Labels Added: ?
avatar bembelimen
bembelimen - comment - 3 Mar 2022

Can't we just put the array in a variable, count and slice out the items which are too much from the middle (https://www.php.net/manual/en/function.array-splice.php) so we have a start/end time?

avatar laoneo
laoneo - comment - 3 Mar 2022

You just have a time of a task, there is no start/end time. This is not a whaterfall chart.

avatar laoneo laoneo - change - 10 Mar 2022
Labels Added: Release Blocker
avatar laoneo
laoneo - comment - 10 Mar 2022

I'm setting this one as a release blocker as it affects a lot of sites and should definitely be fixed and finally shipped with 4.1.1.

avatar richard67
richard67 - comment - 10 Mar 2022

@laoneo Well, the last comment was from @bembelimen , so it would be good to know if he is ok with your reply to it,

avatar laoneo
laoneo - comment - 10 Mar 2022

He didn't reply so my assumption was that he did understand my explanation. I mean the pr is so correct, if he wants to make some adjustments, then he can do that in a followup pr.

avatar richard67
richard67 - comment - 10 Mar 2022

Sure.

avatar bembelimen bembelimen - change - 14 Mar 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-03-14 04:35:50
Closed_By bembelimen
avatar bembelimen bembelimen - close - 14 Mar 2022
avatar bembelimen bembelimen - merge - 14 Mar 2022
avatar bembelimen
bembelimen - comment - 14 Mar 2022

Thx

Add a Comment

Login with GitHub to post a comment