Skip to content
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

Allow gap between async requests #937

Merged
merged 2 commits into from
Apr 26, 2023

Conversation

bramley
Copy link
Contributor

@bramley bramley commented Mar 29, 2023

Description

After the change in #909 to speed up the list page a problem was reported regarding the page returning http 403 when navigating to the next page https://discuss.phplist.org/t/php-8-0-403-access-issues/8781

Investigation showed that the last 3 or 4 of the 10 asynchronous requests were failing in the same way. Presumably the number and rate of requests was being treated as some kind of attack https://discuss.phplist.org/t/php-8-0-403-access-issues/8781/16

This change adds a configurable delay between sending each asynchronous request, with a default of 0.
Also, if a request fails then the sequence is stopped rather than continuing with the likelihood of the remaining requests also failing.

Related Issue

#909

Screenshots (if appropriate):

@phpListDockerBot
Copy link
Contributor

This pull request has been mentioned on phpList Discuss. There might be relevant details there:

https://discuss.phplist.org/t/php-8-0-403-access-issues/8781/18

@michield
Copy link
Member

I've tested it and it works as expected.

We should add it to the resources Wiki and this needs some explanation in the release notes.

@michield
Copy link
Member

@marianaballa marianaballa changed the base branch from main to release-3.6.13 April 26, 2023 15:52
@marianaballa marianaballa merged commit 5843469 into phpList:release-3.6.13 Apr 26, 2023
2 of 6 checks passed
@bramley bramley deleted the async_error_handling branch May 1, 2023 10:37
@phpListDockerBot
Copy link
Contributor

This pull request has been mentioned on phpList Discuss. There might be relevant details there:

https://discuss.phplist.org/t/3-6-13-release-candidate-ready-for-testing/8882/1

marianaballa added a commit that referenced this pull request May 24, 2023
* Avoid php 8.2 warnings (#930)

* Avoid php warnings when run from command line

* Avoid php warning when template does not exist

* Avoid php 8 deprecation regarding string interpolation

* Improve handling of unknown admin to avoid php warnings and deprecations

* Avoid php 8.2 warning about dynamic properties

* Make the results of the timer class use period as the decimal point (#931)

* set DEFAULT_MESSAGE to 8 days (#932)

* Tidy-up output of processqueue (#935)

* Correct parameters to processQueueOutput()

* Replace $GLOBALS['I18N']->get() by s()

* Replace sprintf(s()) calls with simply s()

* remove obsolete files (#936)

* Allow gap between async requests (#937)

* Allow gap between async requests

* Include explanation of ASYNC_REQUEST_INTERVAL in config_extended.php

* When including a message in a template use the content of the body element if it is present instead of the complete message. (#938)

* Allow a plugin to update phplist (#946)

* Allow a plugin to update the phplist code

* When a new release is available link to a plugin if available in preference to the updater

* Revert "Use <wbr> element instead of zero-width space character to allow wrapping of an email address or URL (#926)" (#949)

This reverts commit 74682b0.

* Use <wbr> element instead of zero-width space character to allow wrapping of an email address or URL (#952)

Co-authored-by: Duncan Cameron <phplist@dcameron.me.uk>

* Update the Common, CKEditor, and Segment plugins (#951)

* fix bash issue

* Translations for 3.6.13 (#947)

* Translated using Weblate (English)

Currently translated at 91.2% (1944 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/en/

* Translated using Weblate (Polish)

Currently translated at 99.5% (2121 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/pl/

* Translated using Weblate (Portuguese)

Currently translated at 100.0% (2131 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/pt/

* Translated using Weblate (French)

Currently translated at 99.9% (2129 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/fr/

* Translated using Weblate (French)

Currently translated at 100.0% (2131 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/fr/

* Translated using Weblate (French)

Currently translated at 100.0% (2131 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/fr/

* Translated using Weblate (French)

Currently translated at 100.0% (2131 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/fr/

* Translated using Weblate (French)

Currently translated at 100.0% (2131 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/fr/

* Translated using Weblate (French)

Currently translated at 100.0% (2131 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/fr/

* Translated using Weblate (Galician)

Currently translated at 15.8% (338 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (Galician)

Currently translated at 20.7% (442 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (Galician)

Currently translated at 24.8% (530 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (Galician)

Currently translated at 25.8% (551 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (Galician)

Currently translated at 36.7% (784 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (Spanish)

Currently translated at 98.9% (2108 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/es/

* Translated using Weblate (Galician)

Currently translated at 41.3% (882 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (Galician)

Currently translated at 44.5% (949 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (Galician)

Currently translated at 47.3% (1008 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (Galician)

Currently translated at 49.6% (1059 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (Galician)

Currently translated at 72.6% (1549 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (Galician)

Currently translated at 75.1% (1601 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (Galician)

Currently translated at 76.4% (1630 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (Galician)

Currently translated at 92.9% (1980 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (Galician)

Currently translated at 97.1% (2070 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (Galician)

Currently translated at 97.1% (2071 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (Galician)

Currently translated at 97.2% (2072 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (Galician)

Currently translated at 100.0% (2131 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/gl/

* Translated using Weblate (English)

Currently translated at 91.2% (1945 of 2131 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/en/

* Update dependencies (#895)

* Translated using Weblate (English)

Currently translated at 91.2% (1946 of 2132 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/en/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 38.9% (830 of 2132 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/zh_Hans/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 39.7% (848 of 2132 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/zh_Hans/

* Translated using Weblate (Chinese (Traditional))

Currently translated at 53.7% (1146 of 2132 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/zh_Hant/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 81.0% (1727 of 2132 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/zh_Hans/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 82.1% (1751 of 2132 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/zh_Hans/

* Translated using Weblate (Dutch)

Currently translated at 99.2% (2116 of 2132 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/nl/

* Translated using Weblate (French)

Currently translated at 100.0% (2132 of 2132 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/fr/

* Translated using Weblate (English)

Currently translated at 91.3% (1948 of 2132 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/en/

* Translated using Weblate (German)

Currently translated at 95.2% (2030 of 2132 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/de/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 82.0% (1749 of 2132 strings)

Translation: phpList/phpList3
Translate-URL: http://translate.phplist.org/projects/phplist/phplist3/zh_Hans/

---------

Co-authored-by: Duncan Cameron <phplist@dcameron.me.uk>
Co-authored-by: rysiek_d <ryszard.d79@gmail.com>
Co-authored-by: cflores <carlos.florest@gmail.com>
Co-authored-by: Alain Rihs <alainrihs@sunrise.ch>
Co-authored-by: dinahosting <comunicacion@dinahosting.com>
Co-authored-by: Michiel <michiel@phplist.com>
Co-authored-by: Duncan Cameron <3147688+bramley@users.noreply.github.com>
Co-authored-by: dayadiguo <dayadiguo@gmail.com>

* update version

* update to use the updater plugin

---------

Co-authored-by: Duncan Cameron <3147688+bramley@users.noreply.github.com>
Co-authored-by: Michiel Dethmers <michiel@phplist.com>
Co-authored-by: Duncan Cameron <phplist@dcameron.me.uk>
Co-authored-by: rysiek_d <ryszard.d79@gmail.com>
Co-authored-by: cflores <carlos.florest@gmail.com>
Co-authored-by: Alain Rihs <alainrihs@sunrise.ch>
Co-authored-by: dinahosting <comunicacion@dinahosting.com>
Co-authored-by: dayadiguo <dayadiguo@gmail.com>
@phpListDockerBot
Copy link
Contributor

This pull request has been mentioned on phpList Discuss. There might be relevant details there:

https://discuss.phplist.org/t/phplist-3-6-13-has-been-released/8915/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants