? Success

User tests: Successful: Unsuccessful:

avatar silvioq
silvioq
20 Mar 2015

Sites with many articles (>20K, in our case), can produce server overloading with urls like http://example.org/inexistent-category/inexistent-alias-without-id-prefix

With this fix, we are checking the category before sending the articles query ( $items = $this->get('items') )

avatar silvioq silvioq - open - 20 Mar 2015
avatar joomla-cms-bot joomla-cms-bot - change - 20 Mar 2015
Labels Added: ?
avatar Kubik-Rubik
Kubik-Rubik - comment - 21 Mar 2015

Hi @silvioq,

if the category is not correct, then no items are loaded (see function getItems in components/com_content/models/category.php) anyway. The category is already checked in line 234 ($category = $this->getCategory()), so the change in the process ordering does not improve the performance (I did not check the pagination call though.).

Can you explain in more detail why your PR will improve the performance?

avatar silvioq
silvioq - comment - 21 Mar 2015

Hi @Kubik-Rubik ! Thanks for your response ...

It's true, in https://github.com/silvioq/joomla-cms/blob/staging/components/com_content/models/category.php#L234 valid category is checked, but in our case, in libraries/legacy/view/category.php, $this->get('category') is ROOT, but $this->get('parent') is false ... maybe there are a data trouble?

Regards!

EDIT: $this->getCategory() returns ROOT in category model, line 234

avatar zero-24 zero-24 - change - 22 Mar 2015
Category Libraries
avatar zero-24 zero-24 - change - 22 Mar 2015
The description was changed
avatar silvioq
silvioq - comment - 9 Apr 2015

Hi @Kubik-Rubik!
The patch is in production since 20 days ago, and the server overload didn't produce again ... What do you think about it?

avatar joomlamarco
joomlamarco - comment - 24 Oct 2015

can you give me a testinstruction?


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

avatar RickR2H
RickR2H - comment - 15 Apr 2016

@silvioq Could you please provide some clear test instructions so also the non technical user can test the patch?
Thanks!


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

avatar silvioq
silvioq - comment - 15 Apr 2016

Hi @RickR2H ! For an adequate test, the steps are

The 404 error is returned much more fast, because in the main branch, all jos_content intems are read.

UPDATE:
I don't know if the issue is generated by our particular data, but the patch has been avoiding server overload problems since March 2015

avatar roland-d
roland-d - comment - 21 May 2016

@joomlamarco and @RickR2H can you guys please test? Thanks.


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

avatar kevinscheithauer kevinscheithauer - test_item - 1 Aug 2016 - Tested successfully
avatar kevinscheithauer
kevinscheithauer - comment - 1 Aug 2016

I have tested this item successfully on 40a8c07

I tested this patch @icampus PBF and it seemed to fix the issue for me. Tested on a local test server on Windows 7 with Firefox. I inserted 10000 test articles into the content table of the database and tried to call http://localhost/bugtesting/index.php/inexistent-category/inexistent-alias-without-id-prefix. Before the fix it took a long time to load and display an error and after applying the fix it immediately displayed the 404 Category not found error.


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

avatar rdeutz
rdeutz - comment - 1 Aug 2016

@kevinscheithauer how did you insert 10k articles?

avatar brianteeman
brianteeman - comment - 1 Aug 2016
avatar rdeutz
rdeutz - comment - 1 Aug 2016

@brianteeman I know, my intention was to check how valid the successful test is

avatar brianteeman
brianteeman - comment - 1 Aug 2016

Ah - ok ;)

avatar kevinscheithauer
kevinscheithauer - comment - 1 Aug 2016

I did it with an insert sql statement where I put the values from an article that I created manually via the backend. To be completely honest I didn't know that there was a component for this kinda stuff. Will try it again with the component soon to check if it makes a difference.

avatar mxkmp29 mxkmp29 - test_item - 2 Aug 2016 - Tested successfully
avatar mxkmp29
mxkmp29 - comment - 2 Aug 2016

I have tested this item successfully on 40a8c07

tested successfully @icampus

The patch is working for me. I inserted 10000 entries and testet the url. The error appeared ( memory error).
After the fix it's working fine.


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

avatar roland-d roland-d - change - 2 Aug 2016
Status Pending Ready to Commit
avatar roland-d
roland-d - comment - 2 Aug 2016

RTC as we have 2 successful tests


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

avatar joomla-cms-bot joomla-cms-bot - change - 2 Aug 2016
Labels Added: ?
avatar wilsonge wilsonge - change - 13 Aug 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-08-13 17:44:07
Closed_By wilsonge
avatar wilsonge wilsonge - close - 13 Aug 2016
avatar wilsonge wilsonge - merge - 13 Aug 2016
avatar joomla-cms-bot joomla-cms-bot - close - 13 Aug 2016
avatar joomla-cms-bot joomla-cms-bot - change - 13 Aug 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment