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

Occasional "GET .../?/ProxyExternal/...." responded with 500 #536

Closed
module0x90 opened this issue Sep 29, 2022 · 2 comments
Closed

Occasional "GET .../?/ProxyExternal/...." responded with 500 #536

module0x90 opened this issue Sep 29, 2022 · 2 comments
Labels
external Issue is outside our code

Comments

@module0x90
Copy link

2.17.2, Debian package from repository
Vivaldi Linux, 5.4.2753.51

No 500 responses

View particular emails with embedded images

[27-Sep-2022 16:32:54 UTC] PHP Fatal error: Uncaught RuntimeException: Error 28: Resolving timed out after 5000 milliseconds for https://www.vitality.co.uk/media-online/exstream-email-images/Logo_Vitality_HI_Pink.png in /usr/share/snappymail/snappymail/v/2.17.2/app/libraries/snappymail/http/request/curl.php:88
Stack trace:
#0 /usr/share/snappymail/snappymail/v/2.17.2/app/libraries/snappymail/http/request.php(133): SnappyMail\HTTP\Request\CURL->__doRequest()
#1 /usr/share/snappymail/snappymail/v/2.17.2/app/libraries/RainLoop/ServiceActions.php(360): SnappyMail\HTTP\Request->doRequest()
#2 /usr/share/snappymail/snappymail/v/2.17.2/app/libraries/RainLoop/Service.php(133): RainLoop\ServiceActions->ServiceProxyExternal()
#3 /usr/share/snappymail/snappymail/v/2.17.2/app/libraries/RainLoop/Service.php(15): RainLoop\Service::RunResult()
#4 /usr/share/snappymail/snappymail/v/2.17.2/include.php(169): RainLoop\Service::Handle()
#5 /usr/share/snappymail/index.php(11): include('/usr/share/snap...')
#6 {main}
thrown in /usr/share/snappymail/snappymail/v/2.17.2/app/libraries/snappymail/http/request/curl.php on line 88

I have other uncaught RuntimeException where the actual image url doesn't exist, it returns a 404. But the above does exist and I can access the URL in the same browser, as well as download the image from commandline on the same server where SnappyMail is installed.

@the-djmaze
Copy link
Owner

timed out after 5000 milliseconds

Testing that image, it took between 300ms and 10000 ms before the Incapsula Inc server responded.
As a result, i can conclude their network is terribly slow.

By default all HTTP requests have a timeout of 5 seconds.
You may test a small modification to the code at

$HTTP = \SnappyMail\HTTP\Request::factory();
$HTTP->max_redirects = 2;

Into

	$HTTP = \SnappyMail\HTTP\Request::factory();
	$HTTP->max_redirects = 2;
	$HTTP->timeout = 10;

And see if that solves your issue

@module0x90
Copy link
Author

Even a timeout = 20 still spits out errors.
I do know that their web presence is grinding slow...
I leave it at the default and simply ignore this error in the logs.

Thank you.

@the-djmaze the-djmaze added the external Issue is outside our code label Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external Issue is outside our code
Projects
None yet
Development

No branches or pull requests

2 participants